Closed skidder closed 9 months ago
I'm sorry but I don't think
SetRequestURI
andSetRequestURIBytes
need to be fixed. Users have control over these and can append the/
themselves.
Ah, I see. I'm only using the FastHTTP client, not the FastHTTP server. My expectation was that the FastHTTP client would handle URLs using this format since that's the behavior of the built-in net/http
client. I've been able to implement a work-around in my application, but thought this might be worth covering in FastHTTP.
I'm a little bit afraid to make backwards breaking changes like this. I'll leave this pull request open for now and see if anyone else runs into this.
Fixes #1659
When returning a request URI, check whether it begins with a query (i.e.
?
), in which case we should apply a default path of/
). This is required to conform to the HTTP 1.1 specification.