Skip to content

Commit

Permalink
http requests: use Content-Length instead of Content-length
Browse files Browse the repository at this point in the history
  • Loading branch information
acg committed Jun 20, 2011
1 parent 664c2db commit 5946c27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions url.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,20 +1430,20 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
#endif /* USE_COOKIE */
if (hr->command == HR_COMMAND_POST) {
if (hr->request->enctype == FORM_ENCTYPE_MULTIPART) {
Strcat_charp(tmp, "Content-type: multipart/form-data; boundary=");
Strcat_charp(tmp, "Content-Type: multipart/form-data; boundary=");
Strcat_charp(tmp, hr->request->boundary);
Strcat_charp(tmp, "\r\n");
Strcat(tmp,
Sprintf("Content-length: %ld\r\n", hr->request->length));
Sprintf("Content-Length: %ld\r\n", hr->request->length));
Strcat_charp(tmp, "\r\n");
}
else {
if (!override_content_type) {
Strcat_charp(tmp,
"Content-type: application/x-www-form-urlencoded\r\n");
"Content-Type: application/x-www-form-urlencoded\r\n");
}
Strcat(tmp,
Sprintf("Content-length: %ld\r\n", hr->request->length));
Sprintf("Content-Length: %ld\r\n", hr->request->length));
if (header_string)
Strcat(tmp, header_string);
Strcat_charp(tmp, "\r\n");
Expand Down

0 comments on commit 5946c27

Please sign in to comment.