mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Revert witekfl's e723ddaee6
This is utterly silly and breaks plenty of stuff - Witek, you CAN'T append slashes to all hosts just because some silly referer needs it, everywhere else we NEED the hosts without slashes!
This commit is contained in:
parent
08b3d997b2
commit
c0f98c34ce
@ -460,8 +460,6 @@ struct string *
|
||||
add_uri_to_string(struct string *string, struct uri *uri,
|
||||
enum uri_component components)
|
||||
{
|
||||
int add_host = 0;
|
||||
|
||||
/* Custom or unknown keep the URI untouched. */
|
||||
if (uri->protocol == PROTOCOL_UNKNOWN)
|
||||
return add_to_string(string, struri(uri));
|
||||
@ -488,7 +486,7 @@ add_uri_to_string(struct string *string, struct uri *uri,
|
||||
}
|
||||
|
||||
if (wants(URI_HOST) && uri->hostlen) {
|
||||
add_host = 1;
|
||||
int add_host = 1;
|
||||
|
||||
#ifdef CONFIG_IPV6
|
||||
/* Rationale for wants(URI_PORT): The [notation] was invented
|
||||
@ -552,7 +550,7 @@ add_uri_to_string(struct string *string, struct uri *uri,
|
||||
}
|
||||
|
||||
/* Only add slash if we need to separate */
|
||||
if ((wants(URI_DATA) || wants(URI_POST) || add_host)
|
||||
if ((wants(URI_DATA) || wants(URI_POST))
|
||||
&& wants(~(URI_DATA | URI_PORT))
|
||||
&& get_protocol_need_slash_after_host(uri->protocol))
|
||||
add_char_to_string(string, '/');
|
||||
|
Loading…
Reference in New Issue
Block a user