Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpServerRequest.getPath should only return path #327

Merged
merged 1 commit into from
Feb 9, 2015
Merged

HttpServerRequest.getPath should only return path #327

merged 1 commit into from
Feb 9, 2015

Conversation

brharrington
Copy link
Contributor

If an absolute URI is passed in the request line, e.g.:

GET http://localhost:8090/hello HTTP/1.1

Then the HttpServerRequest.getPath method was returning
the full URI up to the query portion. If the user wanted
the full URI they can call HttpServerRequest.getUri. It
seems confusing to have getPath return the scheme and
host.

This change updates the UriInfoHolder used by
HttpServerRequest to have getPath only return the path.
Note, it does not use java.net.URI to do the parsing because
it is strict and fails for many URIs that are common in
practice, e.g. the URIs with | in the query.

If an absolute URI is passed in the request line, e.g.:

```
GET http://localhost:8090/hello HTTP/1.1
```

Then the HttpServerRequest.getPath method was returning
the full URI up to the query portion. If the user wanted
the full URI they can call HttpServerRequest.getUri. It
seems confusing to have getPath return the scheme and
host.

This change updates the UriInfoHolder used by
HttpServerRequest to have getPath only return the path.
Note, it does not use java.net.URI to do the parsing because
it is strict and fails for many URIs that are common in
practice, e.g. the URIs with `|` in the query.
NiteshKant added a commit that referenced this pull request Feb 9, 2015
HttpServerRequest.getPath should only return path
@NiteshKant NiteshKant merged commit 2f2d2f5 into ReactiveX:0.x Feb 9, 2015
@NiteshKant
Copy link
Member

Thanks @brharrington !

@NiteshKant NiteshKant added this to the 0.4.6 milestone Feb 9, 2015
@brharrington brharrington deleted the req-line-abs-uri branch February 9, 2015 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants