aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
AgeCommit message (Collapse)Author
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-06remove unnecessary typecasting of calloc()Yang Tse
2008-09-06remove unnecessary typecasting of realloc()Yang Tse
2008-09-05Improved the logic the decides whether to use HTTP 1.1 features or not in aDan Fandrich
request. Detect cases where an upload must be sent chunked and the server supports only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
2008-09-02Made some variables const which eliminated some castsDan Fandrich
2008-08-17libcurl internal base64.h header file renamed to curl_base64.hYang Tse
2008-08-16Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TUYang Tse
remain in use as internal curl_off_t print formatting strings for the internal *printf functions which still cannot handle print formatting string directives such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and other DOS/Windows compilers. This reverts previous commit part which did: FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-15For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,Yang Tse
the names of the curl_off_t formatting string directives now become CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU. CURL_FMT_OFF_T -> CURL_FORMAT_CURL_OFF_T CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU Remove the use of an internal name for the curl_off_t formatting string directives and use the common one available from the inside and outside of the library. FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-12Fixed a buffer overflow problem in Curl_proxyCONNECT that could occurDan Fandrich
when a server responded with long headers and data. Luckily, the buffer overflowed into another unused buffer, so no actual harm was done. Added test cases 1060 and 1061 to verify.
2008-08-06remove debug code I accidentally left in hereDaniel Stenberg
2008-08-04- Yehoshua Hershberg found a problem that would make libcurl re-use aDaniel Stenberg
connection with the multi interface even if a previous use of it caused a CURLE_PEER_FAILED_VERIFICATION to get returned. I now make sure that failed SSL connections properly close the connections.
2008-08-04- Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 andDaniel Stenberg
proved how PUT and POST with a redirect could lead to a "hang" due to the data stream not being rewound properly when it had to in order to get sent properly (again) to the subsequent URL. This is now fixed and these test cases are no longer disabled.
2008-08-03- Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUTDaniel Stenberg
with -C - sent garbage in the Content-Range: header. I fixed this problem by making sure libcurl always sets the size of the _entire_ upload if an app attemps to do resumed uploads since libcurl simply cannot know the size of what is currently at the server end. Test 1041 is no longer disabled.
2008-07-30Factored out Curl_copy_header_valueDan Fandrich
2008-07-03Phil Blundell provided a fix for libcurl's treatment of unexpected 1xxDaniel Stenberg
response codes. Previously libcurl would hang on such occurances. I added test case 1033 to verify.
2008-06-22- Eduard Bloch filed the debian bug report #487567Daniel Stenberg
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that libcurl used Content-Range: instead of Range when doing a range request with --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to verify.
2008-05-19when the multi handle was in DO and DOING states, the HTTP and HTTPS protocolDaniel Stenberg
handler functions didn't return that the socket should be waited for writing, but instead it was treated as if no socket was needing monitoring so REMOVE was called prematurely
2008-05-03Added comments, check Curl_http_auth_act()'s return code and added a checkDaniel Stenberg
that closes the connection somewhat faster when perhapsrewind() has marked the connection for closure.
2008-04-17Some trivial changesDan Fandrich
2008-03-31expanded a comment around some of the new formpost callback usageDaniel Stenberg
2008-03-31- Added CURLFORM_STREAM as a supported option to curl_formadd() to allow anDaniel Stenberg
application to provide data for a multipart with the read callback. Note that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the stream option is used. This feature is verified by the new test case 554. This feature was sponsored by Xponaut.
2008-03-27- As found out and reported by Dan Petitt, libcurl didn't show progress/callDaniel Stenberg
the progress callback for the first (potentially huge) piece of body data sent together with the POST request headers in the initial send().
2008-03-01- Anatoli Tubman found and fixed a crash with Negotiate authentication used onDaniel Stenberg
a re-used connection where both requests used Negotiate.
2008-02-18https_getsock() should be static all over (and did some fixed indenting)Daniel Stenberg
2008-02-17rephrased commentDaniel Stenberg
2008-02-17don't do the GOT_NOTHING error check if the DONE function was called withDaniel Stenberg
premature set TRUE, which means it was done before the request comleted. It could then very well not have received any data.
2008-02-15- Pooyan McSporran found and fixed a flaw where you first would do a normalDaniel Stenberg
http request and then you'd reuse the handle and replace the Accept: header, as then libcurl would send two Accept: headers!
2008-01-31- Dmitry Kurochkin moved several struct fields from the connectdata struct toDaniel Stenberg
the SingleRequest one to make pipelining better. It is a bit tricky to keep them in the right place, to keep things related to the actual request or to the actual connection in the right place.
2008-01-25- Kevin Reed filed bug report #1879375Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1879375) which describes how libcurl got lost in this scenario: proxy tunnel (or HTTPS over proxy), ask to do any proxy authentication and the proxy replies with an auth (like NTLM) and then closes the connection after that initial informational response. libcurl would not properly re-initialize the connection to the proxy and continue the auth negotiation like supposed. It does now however, as it will now detect if one or more authentication methods were available and asked for, and will thus retry the connection and continue from there. - I made the progress callback get called properly during proxy CONNECT.
2008-01-23"Igor" pointed out that CURLOPT_COOKIELIST set to "ALL" leaked memory, and soDaniel Stenberg
did "SESS". Fixed now.
2008-01-14Joe Malicki filed bug report #1871269Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1871269) and we could fix his hang- problem that occurred when doing a large HTTP POST request with the response-body read from a callback.
2008-01-10Georg Lippitsch brought CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA to allowDaniel Stenberg
libcurl to seek in a given input stream. This is particularly important when doing upload resumes when there's already a huge part of the file present remotely. Before, and still if this callback isn't used, libcurl will read and through away the entire file up to the point to where the resuming begins (which of course can be a slow opereration depending on file size, I/O bandwidth and more). This new function will also be preferred to get used instead of the CURLOPT_IOCTLFUNCTION for seeking back in a stream when doing multi-stage HTTP auth with POST/PUT.
2007-12-13David Wright filed bug report #1849764Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1849764) with an included fix. He identified a problem for re-used connections that previously had sent Expect: 100-continue and in some situations the subsequent POST (that didn't use Expect:) still had the internal flag set for its use. David's fix (that makes the setting of the flag in every single request unconditionally) is fine and is now used!
2007-12-08All static functions that were previously name Curl_* something no longerDaniel Stenberg
use that prefix as we use that prefix only for library-wide internal global symbols.
2007-12-05Spacen Jasset reported a problem with doing POST (with data read with aDaniel Stenberg
callback) over a proxy when NTLM is used as auth with the proxy. The bug also concerned Digest and was limited to using callback only. Spacen worked with us to provide a useful patch. I added the test case 547 and 548 to verify two variations of POST over proxy with NTLM.
2007-12-02Michal Marek introduced CURLOPT_PROXY_TRANSFER_MODE which is used to controlDaniel Stenberg
the appending of the "type=" thing on FTP URLs when they are passed to a HTTP proxy. Some proxies just don't like that appending (which is done unconditionally in 7.17.1), and some proxies treat binary/ascii transfers better with the appending done!
2007-11-24struct HandleData is now called struct SingleRequest, and is only for data thatDaniel Stenberg
is inited at the start of the DO action. I removed the Curl_transfer_keeper struct completely, and I had to move out a few struct members (that had to be set before DO or used after DONE) to the UrlState struct. The SingleRequest struct is accessed with SessionHandle->req. One of the biggest reasons for doing this was the bunch of duplicate struct members in HandleData and Curl_transfer_keeper since it was really messy to keep track of two variables with the same name and basically the same purpose!
2007-11-20white space changes only to clean up indent and source widthDaniel Stenberg
2007-11-16Fix unsigned integral math check in add_buffer_send()Yang Tse
2007-11-15Ates Goral identified a problem in http.c:add_buffer_send() when a debugDaniel Stenberg
callback was used, as it could wrongly pass on a bad size for the outgoing HTTP header. The bad size would be a very large value as it was a wrapped size_t content. This happened when the whole HTTP request failed to get sent in one single send. http://curl.haxx.se/mail/lib-2007-11/0165.html
2007-11-15removed unnecessary check from add_buffer_send() that only was made withinDaniel Stenberg
#ifdef CURL_DOES_CONVERSIONS anyway! I turned it into a DEBUGASSERT() instead.
2007-11-14Fix a variable potential wrapping in add_buffer() when using absolutelyYang Tse
huge send buffer sizes
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency
2007-10-23Fix compiler warning: subscript has type `char'Yang Tse
2007-10-22Michal Marek forwarded the bug reportDaniel Stenberg
https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to FTP that caused memory havoc. His work together with my efforts created two fixes: #1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with at connection cleanup, at which time the struct HandleData could be used by another connection. Also, the unused char *urlpath member is removed from struct FTP. #2 - provide a Curl_reset_reqproto() function that frees data->reqdata.proto.* on connection setup if needed (that is if the SessionHandle was used by a different connection).
2007-10-17We use this ZERO_NULL to avoid picky compiler warnings,Yang Tse
when assigning a NULL pointer to a function pointer var.
2007-10-15Fix dynamic CURLOPT_POSTFIELDS bug: back to static.Patrick Monnerat
CURLOPT_COPYPOSTFIELDS option added for dynamic. Fix some OS400 features.
2007-10-12Fixed a few compile errors and warnings.Dan Fandrich
2007-10-12Added per-protocol callback static tables, replacing callback ptr storagePatrick Monnerat
in the connectdata structure by a single handler table ptr.
2007-10-07Known bug #47, which confused libcurl if doing NTLM auth over a proxy withDaniel Stenberg
a response that was larger than 16KB is now improved slightly so that now the restriction at 16KB is for the headers only and it should be a rare situation where the response-headers exceed 16KB. Thus, I consider #47 fixed and the header limitation is now known as known bug #48.