decodeable

This commit is contained in:
redkale
2024-09-29 23:02:53 +08:00
parent fbe2a01519
commit b40f975c14
2 changed files with 7 additions and 5 deletions

View File

@@ -728,9 +728,11 @@ public class HttpRequest extends Request<HttpContext> {
size = bytes.length();
if (qst > 0) { // 带?参数
this.requestPath = decodeable
? toDecodeString(bytes, 0, qst, charset)
: context.loadUriPath(bytes, qst, latin1, charset);
if (decodeable) { // 需要转义
this.requestPath = toDecodeString(bytes, 0, qst, charset);
} else {
this.requestPath = context.loadUriPath(bytes, qst, latin1, charset);
}
int qlen = size - qst - 1;
this.queryBytes = bytes.getBytes(qst + 1, qlen);
try {

View File

@@ -143,8 +143,8 @@ public final class ByteArray implements ByteTuple {
}
@Override
public void write(byte b[], int off, int len) throws IOException {
put(b, off, len);
public void write(byte[] bs, int off, int len) throws IOException {
put(bs, off, len);
}
};
}