decodeable
This commit is contained in:
@@ -728,9 +728,11 @@ public class HttpRequest extends Request<HttpContext> {
|
|||||||
|
|
||||||
size = bytes.length();
|
size = bytes.length();
|
||||||
if (qst > 0) { // 带?参数
|
if (qst > 0) { // 带?参数
|
||||||
this.requestPath = decodeable
|
if (decodeable) { // 需要转义
|
||||||
? toDecodeString(bytes, 0, qst, charset)
|
this.requestPath = toDecodeString(bytes, 0, qst, charset);
|
||||||
: context.loadUriPath(bytes, qst, latin1, charset);
|
} else {
|
||||||
|
this.requestPath = context.loadUriPath(bytes, qst, latin1, charset);
|
||||||
|
}
|
||||||
int qlen = size - qst - 1;
|
int qlen = size - qst - 1;
|
||||||
this.queryBytes = bytes.getBytes(qst + 1, qlen);
|
this.queryBytes = bytes.getBytes(qst + 1, qlen);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ public final class ByteArray implements ByteTuple {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(byte b[], int off, int len) throws IOException {
|
public void write(byte[] bs, int off, int len) throws IOException {
|
||||||
put(b, off, len);
|
put(bs, off, len);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user