[
https://issues.apache.org/jira/browse/AWF-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tony Stevenson moved DEFT-104 to AWF-87:
----------------------------------------
Reporter: Niklas Gustavsson
Key: AWF-87 (was: DEFT-104)
Project: Apache AWF (was: Deft)
> HttpRequest Does Not Parse "RequestedPath" Correctly
> ----------------------------------------------------
>
> Key: AWF-87
> URL: https://issues.apache.org/jira/browse/AWF-87
> Project: Apache AWF
> Issue Type: Bug
> Reporter: Niklas Gustavsson
>
> I think there is a problem with the Deft HttpRequest parsing, specifically
> with the value of the requestedPath attribute.
> I believe this value should be the URI up to but not including the query
> string. Currently, the return value for getRequestedPath returns the full
> request line, including the query string.
> For example: /foo?a=XXX&y=ZZZ
> Currently Returns: /foo?a=XXX&y=ZZZ
> Should Return: /foo
> This has the secondary effect of breaking request handler mappings since any
> addition of a query string will result in a request handler for /foo not
> being found.
> I patched this locally as follows:
> public HttpRequest(String requestLine, Map<String, String> headers) {
> this.requestLine = requestLine;
> String[] elements = requestLine.split(" ");
> method = HttpVerb.valueOf(elements[0]);
> String[] pathFrags = elements[1].split("\\?");
> requestedPath = pathFrags[0];
> version = elements[2];
> this.headers = headers;
> body = null;
> initKeepAlive();
> parameters = parseParameters(elements[1]);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira