aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
AgeCommit message (Collapse)Author
2009-01-07Created a CURLMIN macro to match CURLMAXDan Fandrich
2008-12-19- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurlDaniel Stenberg
now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss.
2008-11-14Added some #ifdefs around header files and change the EAGAIN test toDan Fandrich
fix compilation on Cell (reported by Jeff Curley).
2008-10-29Fixed a bug that caused a few bytes of garbage to be sent after aDan Fandrich
curl_easy_pause() during a chunky upload. Reported by Steve Roskowski.
2008-10-23moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_Daniel Stenberg
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-19Fixed a compiler warning in the CURL_DISABLE_HTTP caseDan Fandrich
2008-10-18Removed some more code in the CURL_DISABLE_HTTP caseDan Fandrich
2008-10-17fix compiler warningYang Tse
2008-10-15- John Wilkinson filed bug #2155496Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2155496) pointing out an error case without a proper human-readable error message. When a read callback returns a too large value (like when trying to return a negative number) it would trigger and the generic error message then makes the proplem slightly different to track down. I've added an error message for this now.
2008-10-10Fixed some compiler warnings with CURL_DISABLE_HTTPDan Fandrich
2008-10-09Get rid of some more code in the CURL_DISABLE_HTTP caseDan Fandrich
2008-10-08- Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified andDaniel Stenberg
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing: Any subsequent transfer with a redirect leaks memory, eventually crashing the process potentially. Any subsequent transfer WITHOUT a redirect causes the most recent redirect that DID occur on some previous transfer to still be reported.
2008-10-07Changed the handling of read/write errors in Curl_perform() to allow aDan Fandrich
a fresh connection to be made in such cases and the request retransmitted. This should fix test case 160. Added test case 1079 in an attempt to test a similar connection dropping scenario, but as a race condition, it's hard to test reliably.
2008-09-08fix compiler warningYang Tse
2008-09-08comment < 80 columnsDaniel Stenberg
2008-09-06remove unnecessary typecasting of malloc()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-05- Martin Drasar provided the CURLOPT_POSTREDIR patch. It renamesDaniel Stenberg
CURLOPT_POST301 (but adds a define for backwards compatibility for you who don't define CURL_NO_OLDIES). This option allows you to now also change the libcurl behavior for a HTTP response 302 after a POST to not use GET in the subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the patch somewhat before commit. The curl tool got a matching --post302 option. Test case 1076 was added to verify this.
2008-08-29- When libcurl was doing a HTTP POST and the server would respond withDaniel Stenberg
"Connection: close" and actually close the connection after the response-body, libcurl could still have outstanding data to send and it would not properly notice this and stop sending. This caused weirdness and sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222 Note that there are still reasons to consider libcurl's behavior when getting a >= 400 response code while sending data, as Craig Perras' note "http upload: how to stop on error" specifies: http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-26Fixed out of memory problems that caused torture test failures in testsDan Fandrich
1021 and 1067.
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-12Fix 'result' may be used uninitialized in function readwrite_data()Yang Tse
2008-08-08Refactored Curl_readwrite() into a number of smaller functions.Dan Fandrich
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-01Added more code under #ifndef CURL_DISABLE_HTTP to fix builds withDan Fandrich
--disable-http
2008-07-30Factored out Curl_copy_header_valueDan Fandrich
2008-07-26- David Bau filed bug report #2026240 "CURL_READFUNC_PAUSE leads to bufferDaniel Stenberg
overrun" (http://curl.haxx.se/bug/view.cgi?id=2026240) identifying two problems, and providing the fix for them: - CURL_READFUNC_PAUSE did in fact not pause the _sending_ of data that it is designed for but paused _receiving_ of data! - libcurl didn't internally set the read counter to zero when this return code was detected, which would potentially lead to junk getting sent to the server.
2008-07-10Fixed another OOM problem, this time with test 64.Dan Fandrich
2008-07-09Fixed an OOM handling problem that cause test 11 to fail the torture test.Dan 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-05-26- Bug report #1973352 (http://curl.haxx.se/bug/view.cgi?id=1973352) identifiedDaniel Stenberg
how the HTTP redirect following code didn't properly follow to a new URL if the new url was but a query string such as "Location: ?moo=foo". Test case 1031 was added to verify this fix.
2008-05-09Removed an unused variable and one do-while loop that wasn't used either.Daniel Stenberg
Added a few comments while at it.
2008-05-06fix compiler warning: enumerated type mixed with another typeYang Tse
2008-05-03minor spell and language fix of a commentDaniel Stenberg
2008-05-03- Ben Van Hof filed bug report #1945240: "libcurl sometimes sends body twiceDaniel Stenberg
when using CURL_AUTH_ANY" (http://curl.haxx.se/bug/view.cgi?id=1945240). The problem was that when libcurl rewound a stream meant for upload when it would prepare for a second request, it could accidentally continue the sending of the rewound data on the first request instead of on the second. Ben also provided test case 1030 that verifies this fix.
2008-04-30- To make it easier for applications that want lots of magic stuff done onDaniel Stenberg
redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now introduce the new CURLINFO_REDIRECT_URL option that lets applications extract the URL libcurl would've redirected to if it had been told to. This then enables the application to continue to that URL as it thinks is suitable, without having to re-implement the magic of creating the new URL from the Location: header etc. Test 1029 verifies it.
2008-03-22- Fixed the problem with doing a zero byte SCP transfer, verified with testDaniel Stenberg
case 617 (which was added by Daniel Fandrich 5 Mar 2008).
2008-03-13Change the confusing two variables for the expect 100 continue stuff intoDaniel Stenberg
a single state variable to make the code easier to follow and understand.
2008-02-21- Zmey Petroff found a crash when libcurl accessed a NULL pointer, whichDaniel Stenberg
happened if you set the connection cache size to 1 and for example failed to login to an FTP site. Bug report #1896698 (http://curl.haxx.se/bug/view.cgi?id=1896698)
2008-02-20- We no longer support setting the CURLOPT_URL option from inside a callbackDaniel Stenberg
such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location: following. The patch that introduced this feature was done for 7.11.0, but this code and functionality has been broken since about 7.15.4 (March 2006) with the introduction of non-blocking OpenSSL "connects". It was a hack to begin with and since it doesn't work and hasn't worked correctly for a long time and nobody has even noticed, I consider it a very suitable subject for plain removal. And so it was done.
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-16Dmitry Kurochkin worked a lot on improving the HTTP Pipelining support thatDaniel Stenberg
previously had a number of flaws, perhaps most notably when an application fired up N transfers at once as then they wouldn't pipeline at all that nicely as anyone would think... Test case 530 was also updated to take the improved functionality into account.
2008-01-15Calls to Curl_failf() are not supposed to provide a trailing newline as theDaniel Stenberg
function itself adds that. Fixed on 50 or something strings!
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.
2008-01-10corrected commentDaniel Stenberg
2008-01-09fix compiler warningYang Tse
2008-01-08Introducing curl_easy_pause() and new magic return codes for both the readDaniel Stenberg
and the write callbacks that now can make a connection's reading and/or writing get paused.
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.