aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/IO/http.c6
-rw-r--r--src/html.cc8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/IO/http.c b/src/IO/http.c
index b4131a48..61c153eb 100644
--- a/src/IO/http.c
+++ b/src/IO/http.c
@@ -173,7 +173,7 @@ static char *Http_get_referer(const DilloUrl *url)
/*
* Generate Content-Type header value for a POST query.
*/
-Dstr *Http_get_content_type(const DilloUrl *url)
+Dstr *Http_make_content_type(const DilloUrl *url)
{
Dstr *dstr;
@@ -183,7 +183,7 @@ Dstr *Http_get_content_type(const DilloUrl *url)
if (strlen(URL_DATA(url)) > 2) {
/* boundary lines have "--" prepended. Skip that. */
const char *start = URL_DATA(url) + 2;
- char *eol = strchr(start, '\n');
+ char *eol = strchr(start, '\r');
if (eol)
dStr_append_l(dstr, start, eol - start);
} else {
@@ -232,7 +232,7 @@ char *a_Http_make_query_str(const DilloUrl *url, bool_t use_proxy)
cookies = a_Cookies_get_query(url);
referer = Http_get_referer(url);
if (URL_FLAGS(url) & URL_Post) {
- Dstr *content_type = Http_get_content_type(url);
+ Dstr *content_type = Http_make_content_type(url);
dStr_sprintfa(
query,
"POST %s HTTP/1.1\r\n"
diff --git a/src/html.cc b/src/html.cc
index 234724cc..7519ed49 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3927,10 +3927,10 @@ static void
}
// todo: encode name (RFC 2231) [coming soon]
dStr_sprintfa(url,
- "\n"
- "Content-Disposition: form-data; name=\"%s\"\n"
- "\n"
- "%s\n"
+ "\r\n"
+ "Content-Disposition: form-data; name=\"%s\"\r\n"
+ "\r\n"
+ "%s\r\n"
"--%s",
name, value, boundary);
} else {