Mercurial Hosting > luan
changeset 1371:4c5548a61d4f
add Request.originalPath
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 26 Jun 2019 19:14:13 -0600 |
parents | ba4fc39423a4 |
children | 431d5bec3ca4 |
files | src/luan/lib/webserver/Request.java src/luan/lib/webserver/RequestParser.java src/luan/modules/http/Http.luan |
diffstat | 3 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan/lib/webserver/Request.java Sun Jun 23 19:50:55 2019 -0600 +++ b/src/luan/lib/webserver/Request.java Wed Jun 26 19:14:13 2019 -0600 @@ -9,6 +9,7 @@ public volatile String rawHead; public volatile String method; public volatile String rawPath; + public volatile String originalPath; public volatile String path; public volatile String protocol; // only HTTP/1.1 is accepted public volatile String scheme;
--- a/src/luan/lib/webserver/RequestParser.java Sun Jun 23 19:50:55 2019 -0600 +++ b/src/luan/lib/webserver/RequestParser.java Wed Jun 26 19:14:13 2019 -0600 @@ -73,6 +73,7 @@ throw new ParseException(parser,"bad path"); while( parser.noneOf(" ?#") ); request.path = urlDecode( parser.textFrom(start) ); + request.originalPath = request.path; } private void parseQuery() throws ParseException {
--- a/src/luan/modules/http/Http.luan Sun Jun 23 19:50:55 2019 -0600 +++ b/src/luan/modules/http/Http.luan Wed Jun 26 19:14:13 2019 -0600 @@ -55,6 +55,7 @@ this.raw_head = java.rawHead or error() this.method = java.method or error() this.raw_path = java.rawPath or error() + this.original_path = java.originalPath or error() this.path = java.path or error() this.protocol = java.protocol or error() this.scheme = java.scheme or error()