Mercurial > dillo_port1.3
changeset 414:bfb0dacba6e3
- Used the URL authority part instead of stripped default port in HTTP query.
author | jcid |
---|---|
date | Tue, 14 Oct 2008 17:08:05 +0200 |
parents | e0264ab9f702 |
children | 57892f47bda5 |
files | ChangeLog src/IO/http.c |
diffstat | 2 files changed, 6 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Oct 14 16:55:52 2008 +0200 +++ b/ChangeLog Tue Oct 14 17:08:05 2008 +0200 @@ -5,6 +5,7 @@ dillo-2.1 +- Added support for numeric IPv6 addresses entered into the url bar. + - Used the URL authority part instead of stripped default port in HTTP query. Patch: Justus Winter dillo-2.0
--- a/src/IO/http.c Tue Oct 14 16:55:52 2008 +0200 +++ b/src/IO/http.c Tue Oct 14 17:08:05 2008 +0200 @@ -197,15 +197,10 @@ Dstr *a_Http_make_query_str(const DilloUrl *url, bool_t use_proxy) { char *ptr, *cookies, *referer; - Dstr *s_port = dStr_new(""), - *query = dStr_new(""), + Dstr *query = dStr_new(""), *full_path = dStr_new(""), *proxy_auth = dStr_new(""); - /* Sending the default port in the query may cause a 302-answer. --Jcid */ - if (URL_PORT(url) && URL_PORT(url) != DILLO_URL_HTTP_PORT) - dStr_sprintfa(s_port, ":%d", URL_PORT(url)); - if (use_proxy) { dStr_sprintfa(full_path, "%s%s", URL_STR(url), @@ -233,7 +228,7 @@ "Connection: close\r\n" "Accept-Charset: utf-8,*;q=0.8\r\n" "Accept-Encoding: gzip\r\n" - "Host: %s%s\r\n" + "Host: %s\r\n" "%s" "%s" "User-Agent: Dillo/%s\r\n" @@ -241,7 +236,7 @@ "Content-Type: %s\r\n" "%s" "\r\n", - full_path->str, URL_HOST(url), s_port->str, + full_path->str, URL_AUTHORITY(url), proxy_auth->str, referer, VERSION, URL_DATA(url)->len, content_type->str, cookies); @@ -255,7 +250,7 @@ "Connection: close\r\n" "Accept-Charset: utf-8,*;q=0.8\r\n" "Accept-Encoding: gzip\r\n" - "Host: %s%s\r\n" + "Host: %s\r\n" "%s" "%s" "User-Agent: Dillo/%s\r\n" @@ -264,13 +259,12 @@ full_path->str, (URL_FLAGS(url) & URL_E2EQuery) ? "Cache-Control: no-cache\r\nPragma: no-cache\r\n" : "", - URL_HOST(url), s_port->str, + URL_AUTHORITY(url), proxy_auth->str, referer, VERSION, cookies); } dFree(referer); dFree(cookies); - dStr_free(s_port, TRUE); dStr_free(full_path, TRUE); dStr_free(proxy_auth, TRUE); _MSG("Query: {%s}\n", dStr_printable(query, 8192));