Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd host_port and request_uir methods #421
Closed
Conversation
When constructing HTTP requets path with the query string must be sent to the server. If customer of Url’s object needs to obtain that string they have to construct it by themselves and if query string is present in the URL allocation of a new String is necessary. Add a method which constructs the request UIR and returns reference to internal serialised storage avoiding the necessity to allocate a new String.
HTTP Host header must include port number if that port does not correspond to the defalut port for given scheme¹. Introduce a method which returns such host-port string without the need to allocate a new String object. ¹ https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23
|
Aren’t these methods equivalent to |
|
Ha! Yes, I missed those in the documentation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
mina86 commentedDec 31, 2017
•
edited by larsbergstrom
host_portandrequest_urimethods are useful when dealing with HTTP requests.host_portis what needs to be sent in Host header whilerequest_uriis what needs to be sent in the request line.This change is