aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
AgeCommit message (Collapse)Author
2011-04-20Curl_http_connect: detect HTTPS properly after CONNECTDaniel Stenberg
libcurl failed to check the correct struct for HTTPS after CONNECT was issued to the proxy, so it didn't do the TLS handshake and subsequently failed the connection. A regression released in 7.21.5 (introduced around commit 8831000bc07de). Bug: http://curl.haxx.se/mail/lib-2011-04/0134.html Reported by: Josue Andrade Gomes
2011-04-20CURL_DOES_CONVERSIONS: cleanupDaniel Stenberg
Massively reduce #ifdefs all over (23 #ifdef lines less so far) Moved conversion-specific code to non-ascii.c
2011-04-18transfer-encoding: added new option and cmdlineDaniel Stenberg
Added CURLOPT_TRANSFER_ENCODING as the option to set to request Transfer Encoding in HTTP requests (if built zlib enabled). I also renamed CURLOPT_ENCODING to CURLOPT_ACCEPT_ENCODING (while keeping the old name around) to reduce the confusion when we have to encoding options for HTTP. --tr-encoding is now the new command line option for curl to request this, and thus I updated the test cases accordingly.
2011-04-18TE: do the Connection: headerDaniel Stenberg
When TE: is inserted in the request, we must add a "Connection: TE" as well to be HTTP 1.1 compliant. If a custom Connection: header is passed in, we must use that and only append TE to it. Test case 1125 verifies TE: + custom Connection:.
2011-04-18TE: rename struct field content_encodingDaniel Stenberg
Since this struct member is used in the code to determine what and how to decode automatically and since it is now also used for compressed Transfer-Encodings, I renamed it to the more suitable 'auto_decoding'
2011-04-18HTTP: add support for gzip and deflate Transfer-EncodingDaniel Stenberg
Transfer-Encoding differs from Content-Encoding in a few subtle ways, but primarily it concerns the transfer only and not the content so when discovered to be compressed we know we have to uncompress it. There will only arrive compressed transfers in a response after we have requested them with the appropriate TE: header. Test case 1122 and 1123 verify.
2011-04-04http-proxy: move proxy code to http_proxy.cDaniel Stenberg
The new http_proxy.* files now host HTTP proxy specific code (500+ lines moved out from http.c), and as a consequence there is a macro introduced for the Curl_proxyCONNECT() function so that code can use it without actually supporting proxy (or HTTP) in builds.
2011-03-14protocols: use CURLPROTO_ internallyDaniel Stenberg
The PROT_* set of internal defines for the protocols is no longer used. We now use the same bits internally as we have defined in the public header using the CURLPROTO_ prefix. This is for simplicity and because the PROT_* prefix was already used duplicated internally for a set of KRB4 values. The PROTOPT_* defines were moved up to just below the struct definition within which they are used.
2011-03-14protocol handler: added flags fieldDaniel Stenberg
The protocol handler struct got a 'flags' field for special information and characteristics of the given protocol. This now enables us to move away central protocol information such as CLOSEACTION and DUALCHANNEL from single defines in a central place, out to each protocol's definition. It also made us stop abusing the protocol field for other info than the protocol, and we could start cleaning up other protocol-specific things by adding flags bits to set in the handler struct. The "protocol" field connectdata struct was removed as well and the code now refers directly to the conn->handler->protocol field instead. To make things work properly, the code now always store a conn->given pointer that points out the original handler struct so that the code can learn details from the original protocol even if conn->handler is modified along the way - for example when switching to go over a HTTP proxy.
2011-03-13GSS: handle reuse fixMarcus Sundberg
Make GSS authentication work when a curl handle is reused for multiple authenticated requests, by always setting negdata->state in output_auth_headers(). Signed-off-by: Marcus Sundberg <marcus.sundberg@aptilo.com>
2011-03-08SSL: (part 2) Added CyaSSL to SSL abstraction layerTodd A Ouska
This is the modified existing files commit.
2011-02-25http: removed wrong unused comment.Julien Chaffraix
|premature| is used in Curl_http_done.
2011-02-25http: removed code duplication for stubbed https_getsock function.Julien Chaffraix
2011-02-07Curl_gmtime: added a portable gmtimeDaniel Stenberg
Instead of polluting many places with #ifdefs, we create a single place for this function, and also check return code properly so that a NULL pointer returned won't cause problems.
2011-01-25HTTP: memory leak on multiple Location:Daniel Stenberg
The HTTP parser allocated memory on each received Location: header without properly freeing old data. Starting now, the code only considers the first Location: header and will blissfully ignore subsequent ones. Bug: http://curl.haxx.se/bug/view.cgi?id=3165129 Reported by: Martin Lemke
2011-01-07HTTP: HTTP Negotiate authentication using SSPIMarcel Roelofs
Only under Windows
2010-12-15Preparing for axTLS. Actual SSL API functions are only stubbed.Eric Hu
Added axTLS to autotool files and glue code to misc other files. axtls.h maps SSL API functions, but may change. axtls.c is just a stub file and will definitely change.
2010-12-04fix compiler warning: conversion may lose significant bitsYang Tse
2010-11-05Revert: use Host: name for SNI and cert name checksDaniel Stenberg
This reverts commit b0fd03f5b8d4520dd232a9d13567d16bd0ad8951, 4b2fbe1e97891f, afecd1aa13b4f, 68cde058f66b3
2010-11-04host: get the custom Host: name more genericlyDaniel Stenberg
When given a custom host name in a Host: header, we can use it for several different purposes other than just cookies, so we rename it and use it for SSL SNI etc.
2010-10-20formdata: provide error messageDaniel Stenberg
When failing to build form post due to an error, the code now does a proper failf(). Previously libcurl would report an error like "failed creating formpost data" when a file wasn't possible to open which was not easy for users to figure out. I also lower cased a function name to be named more curl-style and removed some unnecessary code.
2010-10-02HTTP: remove special case for 416Daniel Stenberg
It was pointed out that the special case libcurl did for 416 was incorrect and wrong. 416 is not really different to other errors so the response body must be handled like for other errors/http responses. Reported by: Chris Smowton Bug: http://curl.haxx.se/bug/view.cgi?id=3076808
2010-08-25http: handle trailer headers in all chunked responsesDaniel Stenberg
HTTP allows that a server sends trailing headers after all the chunks have been sent WITHOUT signalling their presence in the first response headers. The "Trailer:" header is only a SHOULD there and as we need to handle the situation even without that header I made libcurl ignore Trailer: completely. Test case 1116 was added to verify this and to make sure we handle more than one trailer header properly. Reported by: Patrick McManus Bug: http://curl.haxx.se/bug/view.cgi?id=3052450
2010-08-16progress: callback for POSTs less than MAX_INITIAL_POST_SIZEJulien Chaffraix
Add a call to Curl_pgrsSetUploadSize in this case valided by a test case. Reported by: Никита Дорохин. Bug: http://curl.haxx.se/mail/lib-2010-04/0173.html
2010-08-10indent: white space fixes onlyDaniel Stenberg
2010-07-24add_buffer_send: fix compiler warningDaniel Stenberg
Win64's 32 bit long but 64 bit size_t caused a warning that we avoid with a typecast. A small whitespace indent fix was also applied. Reported by: Adam Light
2010-07-06http: don't enable chunked during authentication negotiationsDaniel Stenberg
As mentioned in bug report #2956968, the HTTP code wouldn't send the first empty chunk during the auth negotiation phase of the HTTP request sending, so the server would wait for data to come and libcurl would wait for data to arrive... I've made the code not enable chunked encoding until the auth negotiation is done and thus this scenario doesn't occur anymore. Reported by: Sidney San Martn Bug: http://curl.haxx.se/bug/view.cgi?id=2956968
2010-05-07sendrecv: split the I/O handling into private handlerHoward Chu
Howard Chu brought the bulk work of this patch that properly moves out the sending and recving of data to the parts of the code that are properly responsible for the various ways of doing so. Daniel Stenberg assisted with polishing a few bits and fixed some minor flaws in the original patch. Another upside of this patch is that we now abuse CURLcodes less with the "magic" -1 return codes and instead use CURLE_AGAIN more consistently.
2010-05-05PolarSSL: initial support addedHoi-Ho Chan
This is Hoi-Ho Chan's patch with some minor fixes by me. There are some potential issues in this, but none worse than we can sort out on the list and over time.
2010-04-16Curl_setup_transfer: no longer returns anythingDaniel Stenberg
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
2010-04-16GnuTLS: make the connection phase non-blockingJerome Vouillon
When multi interface is used, the SSL handshake is no longer blocking when GnuTLS is used.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-03-23chunked-encoding with Content-Length: header problemDaniel Stenberg
Akos Pasztory filed debian bug report #572276 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572276 mentioning a problem with a resource that returns chunked-encoded _and_ with a Content-Length and libcurl failed to properly ignore the latter information.
2010-02-25fix compiler warningYang Tse
2010-02-04fix printf-style format stringsYang Tse
2010-01-22wrap long lines and do some indent policingDaniel Stenberg
2010-01-22fix compilation when http is disabledYang Tse
2010-01-21fix compiler warningYang Tse
2010-01-21Chris Conroy brought support for RTSP transfers, and with it comes 8(!) newDaniel Stenberg
libcurl options for controlling what to get and how to receive posssibly interleaved RTP data. Initial commit.
2010-01-07removed a parameter from the Curl_http_readwrite_headers() prototype to removeDaniel Stenberg
the need for the struct forward declaration from http.h which caused problems with gcc 2.96 and quite frankly the parameter wasn't necessary anyway
2009-12-29move HTTP-specific functions to http.c where they belongDaniel Stenberg
2009-12-07- Martin Storsjo made libcurl use the Expect: 100-continue header for postsDaniel Stenberg
with unknown size. Previously it was only used for posts with a known size larger than 1024 bytes.
2009-12-01- If the Expect: 100-continue header has been set by the application throughDaniel Stenberg
curl_easy_setopt with CURLOPT_HTTPHEADER, the library should set data->state.expect100header accordingly - the current code (in 7.19.7 at least) doesn't handle this properly. Martin Storsjo provided the fix!
2009-11-18Make usage of calloc()'s arguments consistent with rest of code baseYang Tse
2009-10-30- "Tom" posted a bug report that mentioned how libcurl did wrong when doing aDaniel Stenberg
POST using a read callback, with Digest authentication and "Transfer-Encoding: chunked" enforced. I would then cause the first request to be wrongly sent and then basically hang until the server closed the connection. I fixed the problem and added test case 565 to verify it.
2009-10-18John Dennis filed bug report #2873666Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2873666) which identified a problem which made libcurl loop infinitely when given incorrect credentials when using HTTP GSS negotiate authentication.
2009-08-21With CURLOPT_PROXY_TRANSFER_MODE, avoid sending invalid URLs likeMichal Marek
ftp://example.com;type=i if the user specified ftp://example.com without the slash.
2009-07-08- Constantine Sapuntzakis posted bug report #2813123Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2813123) and an a patch that fixes the problem: Url A is accessed using auth. Url A redirects to Url B (on a different server0. Url B reuses a persistent connection. Url B has auth, even though it's on a different server. Note: if Url B does not reuse a persistent connection, auth is not sent.
2009-06-19fix indentation.Michal Marek
2009-06-16- When doing non-anonymous ftp via http proxies and the password is notMichal Marek
provided in the url, add it there (squid needs this).