summaryrefslogtreecommitdiff
path: root/lib/urldata.h
Commit message (Collapse)AuthorAgeFilesLines
* gssapi: fix deprecated header warningsDaniel Stenberg2019-02-141-2/+4
| | | | | | Heimdal includes on FreeBSD spewed out lots of them. Less so now. Closes #3566
* pretransfer: don't strlen() POSTFIELDS set for GET requestsDaniel Stenberg2019-02-121-1/+0
| | | | | | | | ... since that data won't be used in the request anyway. Fixes #3548 Reported-by: Renaud Allard Close #3549
* spnego_sspi: add support for channel bindinggeorgeok2019-02-011-0/+6
| | | | | | | | | | Attempt to add support for Secure Channel binding when negotiate authentication is used. The problem to solve is that by default IIS accepts channel binding and curl doesn't utilise them. The result was a 401 response. Scope affects only the Schannel(winssl)-SSPI combination. Fixes https://github.com/curl/curl/issues/3503 Closes https://github.com/curl/curl/pull/3509
* ntlm_sspi: add support for channel bindinggeorgeok2019-01-191-0/+6
| | | | | | | | | Windows extended potection (aka ssl channel binding) is required to login to ntlm IIS endpoint, otherwise the server returns 401 responses. Fixes #3280 Closes #3321
* urldata: rename easy_conn to just connDaniel Stenberg2019-01-111-1/+1
| | | | | | | | | | | | | | | We use "conn" everywhere to be a pointer to the connection. Introduces two functions that "attaches" and "detaches" the connection to and from the transfer. Going forward, we should favour using "data->conn" (since a transfer always only has a single connection or none at all) to "conn->data" (since a connection can have none, one or many transfers associated with it and updating conn->data to be correct is error prone and a frequent reason for internal issues). Closes #3442
* multi: multiplexing improvementsDaniel Stenberg2019-01-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #3436 Closes #3448 Problem 1 After LOTS of scratching my head, I eventually realized that even when doing 10 uploads in parallel, sometimes the socket callback to the application that tells it what to wait for on the socket, looked like it would reflect the status of just the single transfer that just changed state. Digging into the code revealed that this was indeed the truth. When multiple transfers are using the same connection, the application did not correctly get the *combined* flags for all transfers which then could make it switch to READ (only) when in fact most transfers wanted to get told when the socket was WRITEABLE. Problem 1b A separate but related regression had also been introduced by me when I cleared connection/transfer association better a while ago, as now the logic couldn't find the connection and see if that was marked as used by more transfers and then it would also prematurely remove the socket from the socket hash table even in times other transfers were still using it! Fix 1 Make sure that each socket stored in the socket hash has a "combined" action field of what to ask the application to wait for, that is potentially the ORed action of multiple parallel transfers. And remove that socket hash entry only if there are no transfers left using it. Problem 2 The socket hash entry stored an association to a single transfer using that socket - and when curl_multi_socket_action() was called to tell libcurl about activities on that specific socket only that transfer was "handled". This was WRONG, as a single socket/connection can be used by numerous parallel transfers and not necessarily a single one. Fix 2 We now store a list of handles in the socket hashtable entry and when libcurl is told there's traffic for a particular socket, it now iterates over all known transfers using that single socket.
* hostip: support wildcard hostsClaes Jakobsson2018-12-271-0/+1
| | | | | | | | | | | | | | | | | This adds support for wildcard hosts in CURLOPT_RESOLVE. These are try-last so any non-wildcard entry is resolved first. If specified, any host not matched by another CURLOPT_RESOLVE config will use this as fallback. Example send a.com to 10.0.0.1 and everything else to 10.0.0.2: curl --resolve *:443:10.0.0.2 --resolve a.com:443:10.0.0.1 \ https://a.com https://b.com This is probably quite similar to using: --connect-to a.com:443:10.0.0.1:443 --connect-to :443:10.0.0.2:443 Closes #3406 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* http: added options for allowing HTTP/0.9 responsesDaniel Stenberg2018-12-211-0/+1
| | | | | | | | | | | | Added CURLOPT_HTTP09_ALLOWED and --http0.9 for this purpose. For now, both the tool and library allow HTTP/0.9 by default. docs/DEPRECATE.md lays out the plan for when to reverse that default: 6 months after the 7.64.0 release. The options are added already now so that applications/scripts can start using them already now. Fixes #2873 Closes #3383
* pingpong: change default response timeout to 120 secondsDaniel Stenberg2018-12-171-1/+1
| | | | Previously it was 30 minutes
* http: Implement trailing headers for chunked transfersAyoub Boudhar2018-12-141-0/+18
| | | | | | | | | | | | | This adds the CURLOPT_TRAILERDATA and CURLOPT_TRAILERFUNCTION options that allow a callback based approach to sending trailing headers with chunked transfers. The test server (sws) was updated to take into account the detection of the end of transfer in the case of trailing headers presence. Test 1591 checks that trailing headers can be sent using libcurl. Closes #3350
* host names: allow trailing dot in name resolve, then strip itTobias Hintze2018-11-221-0/+1
| | | | | | | Delays stripping of trailing dots to after resolving the hostname. Fixes #3022 Closes #3222
* setopt: add CURLOPT_CURLUJim Fuller2018-11-091-0/+1
| | | | | | Allows an application to pass in a pre-parsed URL via a URL handle. Closes #3227
* urldata: Fix comment in headerMichael Kaufmann2018-10-251-1/+1
| | | | The "connecting" function is used by multiple protocols, not only FTP
* spelling fixes [ci skip]Viktor Szakats2018-10-081-1/+1
| | | | | | | as detected by codespell 1.14.0 Closes https://github.com/curl/curl/pull/3114 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* url: use the URL API internally as wellDaniel Stenberg2018-09-221-3/+14
| | | | | | ... to make it a truly unified URL parser. Closes #3017
* upkeep: add a connection upkeep API: curl_easy_conn_upkeep()Max Dymond2018-09-071-0/+9
| | | | | | | | | Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641
* CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer sizeDaniel Stenberg2018-09-061-10/+2
| | | | | | | This is step 3 of #2888. Fixes #2888 Closes #2896
* setopt: add CURLOPT_DOH_URLDaniel Stenberg2018-09-061-5/+33
| | | | Closes #2668
* tests: add unit tests for url.cJim Fuller2018-09-051-2/+1
| | | | | Approved-by: Daniel Gustafsson Closes #2937
* upload: change default UPLOAD_BUFSIZE to 64KBDaniel Stenberg2018-08-181-2/+7
| | | | | | | To make uploads significantly faster in some circumstances. Part 2 of #2888 Closes #2892
* upload: allocate upload buffer on-demandDaniel Stenberg2018-08-181-1/+3
| | | | | | | Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888
* vtls: reinstantiate engine on duplicated handlesLaurent Bonnans2018-08-181-0/+1
| | | | | | | | | | | | Handles created with curl_easy_duphandle do not use the SSL engine set up in the original handle. This fixes the issue by storing the engine name in the internal url state and setting the engine from its name inside curl_easy_duphandle. Reported-by: Anton Gerasimov Signed-of-by: Laurent Bonnans Fixes #2829 Closes #2833
* urldata: remove unused pipe_broke struct fieldDaniel Stenberg2018-08-161-3/+0
| | | | | | | This struct field is never set TRUE in any existing code path. This change removes the field completely. Closes #2871
* http: fix for tiny "HTTP/0.9" responseDaniel Stenberg2018-08-131-5/+0
| | | | | | | | | | | Deal with tiny "HTTP/0.9" (header-less) responses by checking the status-line early, even before a full "HTTP/" is received to allow detecting 0.9 properly. Test 1266 and 1267 added to verify. Fixes #2420 Closes #2872
* http2: several cleanupsDaniel Stenberg2018-07-201-1/+1
| | | | | | | | - separate easy handle from connections better - added asserts on a number of places - added sanity check of pipelines for debug builds Closes #2751
* conn: remove the boolean 'inuse' fieldDaniel Stenberg2018-07-111-5/+6
| | | | ... as the usage needs to be counted.
* Curl_debug: remove dead printhost codeDaniel Stenberg2018-06-121-2/+0
| | | | | | | | | The struct field is never set (since 5e0d9aea3) so remove the use of it and remove the connectdata pointer from the prototype. Reported-by: Tejas Bug: https://curl.haxx.se/mail/lib-2018-06/0054.html Closes #2647
* openssl: assume engine support in 1.0.1 or laterDaniel Stenberg2018-06-111-1/+1
| | | | | | | | | | | | Previously it was checked for in configure/cmake, but that would then leave other build systems built without engine support. While engine support probably existed prior to 1.0.1, I decided to play safe. If someone experience a problem with this, we can widen the version check. Fixes #2641 Closes #2644
* spelling fixesViktor Szakats2018-06-031-1/+1
| | | | | | Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
* option: disallow username in URLBjörn Stenberg2018-05-311-0/+1
| | | | | | | Adds CURLOPT_DISALLOW_USERNAME_IN_URL and --disallow-username-in-url. Makes libcurl reject URLs with a username in them. Closes #2340
* setopt: add TLS 1.3 ciphersuitesDaniel Stenberg2018-05-291-0/+3
| | | | | | | | | | Adds CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS. curl: added --tls13-ciphers and --proxy-tls13-ciphers Fixes #2435 Reported-by: zzq1015 on github Closes #2607
* psl: use latest psl and refresh it periodicallyPatrick Monnerat2018-05-281-0/+4
| | | | | | | | | | | The latest psl is cached in the multi or share handle. It is refreshed before use after 72 hours. New share lock CURL_LOCK_DATA_PSL controls the psl cache sharing. If the latest psl is not available, the builtin psl is used. Reported-by: Yaakov Selkowitz Fixes #2553 Closes #2601
* docs: mention HAproxy protocol "version 1"Aleks2018-05-181-1/+1
| | | | | | ...as there's also a version 2. Closes #2579
* http2: use the correct function pointer typedefDaniel Stenberg2018-05-141-14/+14
| | | | | | | Fixes gcc-8 picky compiler warnings Reported-by: Rikard Falkeborn Bug: #2560 Closes #2568
* http2: handle GOAWAY properlyDaniel Stenberg2018-04-201-1/+1
| | | | | | | | | | When receiving REFUSED_STREAM, mark the connection for close and retry streams accordingly on another/fresh connection. Reported-by: Terry Wu Fixes #2416 Fixes #1618 Closes #2510
* ntlm_sspi: fix authentication using Credential Managertoughengineer2018-04-161-0/+1
| | | | | | | | | | | | | If you pass empty user/pass asking curl to use Windows Credential Storage (as stated in the docs) and it has valid credentials for the domain, e.g. curl -v -u : --ntlm example.com currently authentication fails. This change fixes it by providing proper SPN string to the SSPI API calls. Fixes https://github.com/curl/curl/issues/1622 Closes https://github.com/curl/curl/pull/1660
* urldata: make service names unconditionalMarcel Raad2018-04-161-5/+0
| | | | | | | | | | | The ifdefs have become quite long. Also, the condition for the definition of CURLOPT_SERVICE_NAME and for setting it from CURLOPT_SERVICE_NAME have diverged. We will soon also need the two options for NTLM, at least when using SSPI, for https://github.com/curl/curl/pull/1660. Just make the definitions unconditional to make that easier. Closes https://github.com/curl/curl/pull/2479
* resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSESRick Deist2018-03-171-0/+2
| | | | | | | | | | | This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request shuffling of IP addresses returned for a hostname when there is more than one. This is useful when the application knows that a round robin approach is appropriate and is willing to accept the consequences of potentially discarding some preference order returned by the system's implementation. Closes #1694
* CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocolLawrence Matthews2018-03-171-0/+2
| | | | | | Add --haproxy-protocol for the command line tool Closes #2162
* cleanup: misc typos in strings and commentsluz.paz2018-03-161-1/+1
| | | | | | Found via `codespell` Closes #2389
* spelling fixesViktor Szakats2018-02-231-1/+1
| | | | | | | | Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
* url: Add option CURLOPT_RESOLVER_START_FUNCTIONFrancisco Sedano2018-02-211-0/+4
| | | | | | | | | | | | - Add new option CURLOPT_RESOLVER_START_FUNCTION to set a callback that will be called every time before a new resolve request is started (ie before a host is resolved) with a pointer to backend-specific resolver data. Currently this is only useful for ares. - Add new option CURLOPT_RESOLVER_START_DATA to set a user pointer to pass to the resolver start callback. Closes https://github.com/curl/curl/pull/2311
* url: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUTAnders Bakken2018-02-201-0/+1
| | | | | | | | | | | | | | - Add new option CURLOPT_HAPPY_EYEBALLS_TIMEOUT to set libcurl's happy eyeball timeout value. - Add new optval macro CURL_HET_DEFAULT to represent the default happy eyeballs timeout value (currently 200 ms). - Add new tool option --happy-eyeballs-timeout-ms to expose CURLOPT_HAPPY_EYEBALLS_TIMEOUT. The -ms suffix is used because the other -timeout options in the tool expect seconds not milliseconds. Closes https://github.com/curl/curl/pull/2260
* time: support > year 2038 time stamps for system with 32bit longDaniel Stenberg2018-01-301-4/+2
| | | | | | | | ... with the introduction of CURLOPT_TIMEVALUE_LARGE and CURLINFO_FILETIME_T. Fixes #2238 Closes #2264
* http: prevent custom Authorization headers in redirectsDaniel Stenberg2018-01-221-1/+1
| | | | | | | | | | | | ... unless CURLOPT_UNRESTRICTED_AUTH is set to allow them. This matches how curl already handles Authorization headers created internally. Note: this changes behavior slightly, for the sake of reducing mistakes. Added test 317 and 318 to verify. Reported-by: Craig de Stigter Bug: https://curl.haxx.se/docs/adv_2018-b3bf.html
* progress: calculate transfer speed on milliseconds if possibleDaniel Stenberg2018-01-081-1/+1
| | | | | | | to increase accuracy for quick transfers Fixes #2200 Closes #2206
* CONNECT: keep close connection flag in http_connect_state structZachary Seguin2017-12-071-0/+1
| | | | | Fixes #2088 Closes #2157
* configure: check for netinet/in6.hRandall S. Becker2017-12-061-0/+3
| | | | | | | Needed by HPE NonStop NSE and NSX systems Fixes #2146 Closes #2155
* conncache: fix several lock issuesDaniel Stenberg2017-12-051-3/+7
| | | | | | | | | If the lock is released before the dealings with the bundle is over, it may have changed by another thread in the mean time. Fixes #2132 Fixes #2151 Closes #2139
* Added support for libssh SSH SCP back-endNikos Mavrogiannopoulos2017-12-011-1/+1
| | | | | | | | | | libssh is an alternative library to libssh2. https://www.libssh.org/ That patch set also introduces support for ECDSA ed25519 keys, as well as gssapi authentication. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>