BUG/MINOR: http-htx: Normalized absolute URIs with an empty port
Thanks to the previous commit ("MINOR: http: Considere empty ports as valid default ports"), empty ports are now considered as valid default ports. Thus, absolute URIs with empty port should be normalized. So now, the following URIs are normalized: http://example.com:/ --> http://example.com/ https://example.com:/ --> https://example.com/ This patch depend on: * MINOR: h1: Consider empty port as invalid in authority for CONNECT * MINOR: http: Considere empty ports as valid default ports It is a bug regarding the RFC3986. Technically, I may be backported as far as 2.4. However, this must be discussed first. If backported, the commits above must be backported too.
This commit is contained in:
parent
99ade9e0da
commit
e5dfe1169d
@ -1767,7 +1767,7 @@ int http_scheme_based_normalize(struct htx *htx)
|
||||
}
|
||||
host = isttrim(authority, istlen(authority) - istlen(port) - 1);
|
||||
|
||||
if (istlen(port) && http_is_default_port(scheme, port)) {
|
||||
if (http_is_default_port(scheme, port)) {
|
||||
/* reconstruct the uri with removal of the port */
|
||||
struct buffer *temp = get_trash_chunk();
|
||||
struct ist meth, vsn;
|
||||
|
Loading…
x
Reference in New Issue
Block a user