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(); 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 {

View File

@@ -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);
} }
}; };
} }