forked from MirrorHub/authlib-injector
nanohttpd: refactor x2
This commit is contained in:
parent
05f61d92c6
commit
2df9dde936
1 changed files with 3 additions and 5 deletions
|
@ -219,22 +219,20 @@ public abstract class NanoHTTPD {
|
|||
throw new ResponseException(Status.BAD_REQUEST, "BAD REQUEST: Missing URI.");
|
||||
}
|
||||
|
||||
String uri = st.nextToken();
|
||||
String rawUri = st.nextToken();
|
||||
|
||||
// Decode parameters from the URI
|
||||
int qmi = uri.indexOf('?');
|
||||
if (qmi >= 0) {
|
||||
this.queryParameterString = uri.substring(qmi + 1);
|
||||
this.parms = Collections.unmodifiableMap(decodeParms(this.queryParameterString));
|
||||
uri = decodePercent(uri.substring(0, qmi));
|
||||
this.uri = decodePercent(rawUri.substring(0, qmi));
|
||||
} else {
|
||||
this.queryParameterString = null;
|
||||
this.parms = Collections.emptyMap();
|
||||
uri = decodePercent(uri);
|
||||
this.uri = decodePercent(rawUri);
|
||||
}
|
||||
|
||||
this.uri = uri;
|
||||
|
||||
// If there's another token, its protocol version,
|
||||
// followed by HTTP headers.
|
||||
// NOTE: this now forces header names lower case since they are
|
||||
|
|
Loading…
Reference in a new issue