aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
AgeCommit message (Collapse)Author
2008-09-29Moved all signal-based name resolution timeout handling into a single newDan Fandrich
Curl_resolv_timeout function to reduce coupling.
2008-09-24ntoa() and inet_ntoa_r() no longer usedYang Tse
2008-09-24Make sure not to dereference the wrong UrlState proto union member whenDan Fandrich
switching from one protocol to another in a single request (e.g. redirecting from HTTP to FTP as in test 1055) by resetting state.expect100header before every request.
2008-09-19Only define alarmfunc when signals are usedDan Fandrich
2008-09-19Don't bother to install a SIGALRM handler unless alarm() is available.Dan Fandrich
Also, leave the existing SIGALRM handler alone if the timeout is too small to handle.
2008-09-18fix compiler warning: external declaration in primary source fileYang Tse
2008-09-08fix compiler warningYang Tse
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-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-09-05- Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. ByDaniel Stenberg
enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS or FTPS), libcurl will gather lots of server certificate info and that info can then get extracted by a client after the request has completed with curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing helped me test and smoothen out this feature. Unfortunately, this feature currently only works with libcurl built to use OpenSSL. This feature was sponsored by networking4all.com - thanks!
2008-09-04fix print formatting string directivesYang Tse
2008-09-02Made some variables const which eliminated some castsDan Fandrich
2008-08-28- Dengminwen reported that libcurl would lock a (cookie) share twice (withoutDaniel Stenberg
an unlock in between) for a certain case and that in fact works when using regular windows mutexes but not with pthreads'! Locks should of course not get locked again so this is now fixed. http://curl.haxx.se/mail/lib-2008-08/0422.html
2008-08-28Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to setDan Fandrich
the HTTP method to GET (or HEAD) when given a value of 0.
2008-08-26Fixed out of memory problems that caused torture test failures in testsDan Fandrich
1021 and 1067.
2008-08-21Work around a scanf() bug in djgpp 2.04. The assignments for thisGisle Vanem
format is working okay. But the return value is incorrectly EOF.
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-11- Constantine Sapuntzakis filed bug report #2042440Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2042440) with a patch. He identified a problem when using NTLM over a proxy but the end-point does Basic, and then libcurl would do wrong when the host sent "Connection: close" as the proxy's NTLM state was erroneously cleared.
2008-08-01User names embedded in proxy URLs without a password were parsedDan Fandrich
incorrectly--the host name is treated as part of the user name and the port number becomes the password. This can be observed in test 279 (was KNOWN_ISSUE #54).
2008-08-01Refactored create_conn by breaking it up into many smaller functionsDan Fandrich
2008-07-31Fixed a problem with any FTP URL or any URLs containing an IPv6 addressDan Fandrich
being mangled when passed to proxies when CURLOPT_PORT is also set (reported by Pramod Sharma).
2008-07-31Fixed parsing of an IPv6 proxy address to support a scope identifier,Dan Fandrich
as well as IPv4 addresses in IPv6 format. Also, better handle the case of a malformatted IPv6 address (avoid empty and NULL strings).
2008-07-31Fixed a couple of problems in the IPv6 scope code. First, a host name inDan Fandrich
an URL in a Location: header didn't have the scope ID removed, so an invalid host name was used. Second, when the scope ID was removed, it also removed any port number that may have existed in the URL.
2008-07-30- Phil Blundell added the CURLOPT_SCOPE option, as well as adjusted the URLDaniel Stenberg
parser to allow numerical IPv6-addresses to be specified with the scope given, as per RFC4007 - with a percent letter that itself needs to be URL escaped. For example, for an address of fe80::1234%1 the HTTP URL is: "http://[fe80::1234%251]/"
2008-07-11indent and comment cleanup (no code change)Daniel Stenberg
2008-07-11- Daniel Fandrich found out we didn't pass on the user-agent properly whenDaniel Stenberg
doing "proxy-tunnels" with non-HTTP prototols and that was simply because the code assumed the user-agent was only needed for HTTP.
2008-07-03Introcuding a new timestamp for curl_easy_getinfo():Daniel Stenberg
CURLINFO_APPCONNECT_TIME. This is set with the "application layer" handshake/connection is completed (typically SSL, TLS or SSH). By using this you can figure out the application layer's own connect time. You can extract the time stamp using curl's -w option and the new variable named 'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
2008-07-01CreateConnection collided with a function using the exact same name in theDaniel Stenberg
INTEGRITY RTOS, so I renamed it to create_conn. It then made sense to also rename SetupConnection to setup_conn to match it.
2008-06-30- Stephen Collyer and Tor Arntsen helped identify a flaw in the range codeDaniel Stenberg
which output the range using a signed variable where it should rather use unsigned.
2008-06-22Stopped using ranges in scanf character sequences (e.g. %[a-z]) since thatDan Fandrich
is not ANSI C, just a common extension. This caused problems on at least Open Watcom C.
2008-06-19- Dengminwen found a bug in the connection re-use function when using theDaniel Stenberg
multi interface with pipelining enabled as it would wrongly check for, detect and close "dead connections" even though that connection was already in use!
2008-06-06- Axel Tillequin and Arnaud Ebalard added support for CURLOPT_ISSUERCERT, forDaniel Stenberg
OpenSSL, NSS and GnuTLS-built libcurls.
2008-06-06- Axel Tillequin and Arnaud Ebalard added support for CURLOPT_CRLFILE, forDaniel Stenberg
OpenSSL, NSS and GnuTLS-built libcurls.
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-04-22Added support for running on Symbian OS.Dan Fandrich
2008-04-05provide CURL_DEFAULT_PROXY_PORT set to 1080 for the default port libcurlDaniel Stenberg
assumes proxies to use
2008-04-03- Setting CURLOPT_NOBODY to FALSE will now switch the HTTP request method toDaniel Stenberg
GET simply because previously when you set CURLOPT_NOBODY to TRUE first and then FALSE you'd end up in a broken state where a HTTP request would do a HEAD by still act a lot like for a GET and hang waiting for the content etc.
2008-03-31Removed the generated ca-bundle.h file. The verbatim value of $ca andMichal Marek
$capath is known to configure, so it can be defined in config.h instead.
2008-03-25- Made setting the CURLOPT_SSL_CTX_FUNCTION option return a failure in caseDaniel Stenberg
libcurl wasn't built to use OpenSSL as that is a prerequisite for this option to function!
2008-03-20- Added --with-ca-path=DIRECTORY configure option to use an openSSL CApath byMichal Marek
default instead of a ca bundle. The configure script will also look for a ca path if no ca bundle is found and no option given. - Fixed detection of previously installed curl-ca-bundle.crt
2008-02-21assert that the *connp is a non-NULL pointer when Curl_done() is calledDaniel Stenberg
2008-02-20- Based on initial work done by Gautam Kachroo to address a bug, we now keepDaniel Stenberg
better control at the exact state of the connection's SSL status so that we know exactly when it has completed the SSL negotiation or not so that there won't be accidental re-uses of connections that are wrongly believed to be in SSL-completed-negotiate state.
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-02-17In Curl_done() if premature is TRUE, it means this connection was said to beDaniel Stenberg
DONE before the entire request operation is complete and thus we can't know in what state it is for re-using, so we're forced to close it. In a perfect world we can add code that keep track of if we really must close it here or not, but currently we have no such detail knowledge. Jerome Muffat-Meridol helped us work this out.
2008-02-15mention that we explicitly ignore the return codeDaniel Stenberg
2008-02-03- Dmitry Kurochkin cleaned up the pipelining code and removed the need for andDaniel Stenberg
use of the "is_in_pipeline" struct field.