get respCode and respCntType from response
This commit is contained in:
parent
7ccd47d74b
commit
6954a15bf4
|
@ -163,8 +163,8 @@ public class RequestHandler implements Runnable {
|
|||
|
||||
this.serverIn = serverConnection.getInputStream();
|
||||
synchronized (mutex) {
|
||||
this.proxyServer.processRequest(this.header, requestBody);
|
||||
log.trace("processed request");
|
||||
// this.proxyServer.processRequest(this.header, requestBody);
|
||||
// log.trace("processed request");
|
||||
|
||||
this.buffer.reset();
|
||||
int len;
|
||||
|
|
|
@ -173,7 +173,7 @@ public abstract class AbstractCodeGenerator implements IScriptGenerator,
|
|||
// doParseRequest(header, requestBody);
|
||||
}
|
||||
|
||||
private void doParseRequest(HttpRequestHeader header, byte[] requestBody)
|
||||
private void doParseRequest(HttpRequestHeader header, byte[] requestBody, int respCode, String respContentType)
|
||||
throws UserException, UnsupportedEncodingException {
|
||||
Param[] params;
|
||||
int i;
|
||||
|
@ -342,7 +342,7 @@ public abstract class AbstractCodeGenerator implements IScriptGenerator,
|
|||
&& responseHeader.isHtmlContentType()
|
||||
&& hasHtmlTag(responseParser)) {
|
||||
dealWithHtmlResponse(header, responseParser);
|
||||
doParseRequest(header, requestBody);
|
||||
doParseRequest(header, requestBody, responseHeader.getRespCode(), responseHeader.getContentType());
|
||||
|
||||
response.setResponse(responseParser.encodeCoent(doParseHtmlContent(responseParser.getResponseBody(), header.url)));
|
||||
setStruts(new String(response.getResponse()).toLowerCase().indexOf(
|
||||
|
@ -357,7 +357,7 @@ public abstract class AbstractCodeGenerator implements IScriptGenerator,
|
|||
log.debug("Ignoring response because content type is not known: "
|
||||
+ responseHeader.getRespCode());
|
||||
}
|
||||
doParseRequest(header, requestBody);
|
||||
doParseRequest(header, requestBody, responseHeader.getRespCode(), responseHeader.getContentType());
|
||||
}
|
||||
|
||||
private boolean hasHtmlTag(ResponseParser responseParser) {
|
||||
|
|
Loading…
Reference in New Issue