summaryrefslogtreecommitdiff
path: root/lib/http2.h
Commit message (Collapse)AuthorAgeFilesLines
* dynbuf: introduce internal generic dynamic buffer functionsDaniel Stenberg2020-04-281-1/+1
| | | | | | | | | | | A common set of functions instead of many separate implementations for creating buffers that can grow when appending data to them. Existing functionality has been ported over. In my early basic testing, the total number of allocations seem at roughly the same amount as before, possibly a few less. See docs/DYNBUF.md for a description of the API.
* http2: make pausing/unpausing set/clear local stream windowDaniel Stenberg2020-02-271-1/+3
| | | | | | | | | | | | | This reduces the HTTP/2 window size to 32 MB since libcurl might have to buffer up to this amount of data in memory and yet we don't want it set lower to potentially impact tranfer performance on high speed networks. Requires nghttp2 commit b3f85e2daa629 (https://github.com/nghttp2/nghttp2/pull/1444) to work properly, to end up in the next release after 1.40.0. Fixes #4939 Closes #4940
* conncache: fix multi-thread use of shared connection cacheDaniel Stenberg2019-12-091-1/+1
| | | | | | | | | It could accidentally let the connection get used by more than one thread, leading to double-free and more. Reported-by: Christopher Reid Fixes #4544 Closes #4557
* headers: Remove no longer exported functionsDaniel Gustafsson2019-07-101-3/+1
| | | | | | | | | | | | | | | | | | | | There were a leftover few prototypes of Curl_ functions that we used to export but no longer do, this removes those prototypes and cleans up any comments still referring to them. Curl_write32_le(), Curl_strcpy_url(), Curl_strlen_url(), Curl_up_free() Curl_concat_url(), Curl_detach_connnection(), Curl_http_setup_conn() were made static in 05b100aee247bb9bec8e9a1b0166496aa4248d1c. Curl_http_perhapsrewind() made static in 574aecee208f79d391f10d57520b3. For the remainder, I didn't trawl the Git logs hard enough to capture their exact time of deletion, but they were all gone: Curl_splayprint(), Curl_http2_send_request(), Curl_global_host_cache_dtor(), Curl_scan_cache_used(), Curl_hostcache_destroy(), Curl_second_connect(), Curl_http_auth_stage() and Curl_close_connections(). Closes #4096 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* cleanup: make local functions staticDaniel Stenberg2019-02-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | urlapi: turn three local-only functions into statics conncache: make conncache_find_first_connection static multi: make detach_connnection static connect: make getaddressinfo static curl_ntlm_core: make hmac_md5 static http2: make two functions static http: make http_setup_conn static connect: make tcpnodelay static tests: make UNITTEST a thing to mark functions with, so they can be static for normal builds and non-static for unit test builds ... and mark Curl_shuffle_addr accordingly. url: make up_free static setopt: make vsetopt static curl_endian: make write32_le static rtsp: make rtsp_connisdead static warnless: remove unused functions memdebug: remove one unused function, made another static
* Upon HTTP_1_1_REQUIRED, retry the request with HTTP/1.1Johannes Schindelin2018-12-081-0/+4
| | | | | | | | | | | | | | | | | | | This is a companion patch to cbea2fd2c (NTLM: force the connection to HTTP/1.1, 2018-12-06): with NTLM, we can switch to HTTP/1.1 preemptively. However, with other (Negotiate) authentication it is not clear to this developer whether there is a way to make it work with HTTP/2, so let's try HTTP/2 first and fall back in case we encounter the error HTTP_1_1_REQUIRED. Note: we will still keep the NTLM workaround, as it avoids an extra round trip. Daniel Stenberg helped a lot with this patch, in particular by suggesting to introduce the Curl_h2_http_1_1_error() function. Closes #3349 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* whitespace fixesViktor Szakats2018-09-231-1/+0
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* http2: several cleanupsDaniel Stenberg2018-07-201-2/+2
| | | | | | | | - separate easy handle from connections better - added asserts on a number of places - added sanity check of pipelines for debug builds Closes #2751
* http2: fix OOM crashDaniel Stenberg2017-06-181-3/+4
| | | | torture mode with test 1021 found it
* http2: Fix crashes when parent stream gets abortedAnders Bakken2016-11-281-0/+8
| | | | Closes #1125
* http2: return EOF when done uploading without known sizeDaniel Stenberg2016-09-051-0/+2
| | | | Fixes #982
* http2: make sure stream errors don't needlessly close the connectionDaniel Stenberg2016-08-281-1/+3
| | | | | | | | With HTTP/2 each transfer is made in an indivial logical stream over the connection, making most previous errors that caused the connection to get forced-closed now instead just kill the stream and not the connection. Fixes #941
* internals: rename the SessionHandle struct to Curl_easyDaniel Stenberg2016-06-221-1/+1
|
* http2: Add Curl_http2_strerror for HTTP/2 error codesJay Satiro2016-04-111-0/+2
| | | | | Ref: https://github.com/curl/curl/issues/659 Ref: https://github.com/curl/curl/pull/663
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* http2: added three stream prio/deps optionsDaniel Stenberg2015-10-231-0/+4
| | | | | | | | CURLOPT_STREAM_DEPENDS CURLOPT_STREAM_DEPENDS_E CURLOPT_STREAM_PRIORITY
* http2: setup the new pushed stream properlyDaniel Stenberg2015-06-241-0/+2
|
* http2: set default concurrency, fix ConnectionExists for multiplexDaniel Stenberg2015-05-181-1/+9
|
* http2: fix switched macro when http2 is not enabledDaniel Stenberg2014-11-131-1/+1
|
* http2: Deal with HTTP/2 data inside response header bufferTatsuhiro Tsujikawa2014-11-131-1/+2
| | | | | | | | | Previously if HTTP/2 traffic is appended to HTTP Upgrade response header (thus they are in the same buffer), the trailing HTTP/2 traffic is not processed and lost. The appended data is most likely SETTINGS frame. If it is lost, nghttp2 library complains server does not obey the HTTP/2 protocol and issues GOAWAY frame and curl eventually drops connection. This commit fixes this problem and now trailing data is processed.
* http2: more and better error checkingDaniel Stenberg2014-07-231-2/+2
| | | | | | | 1 - fixes the warnings when built without http2 support 2 - adds CURLE_HTTP2, a new error code for errors detected by nghttp2 basically when they are about http2 specific things.
* https: Fix build when http2 is disabledDan Fandrich2014-06-151-5/+5
|
* http2: better return code error checkingDaniel Stenberg2014-06-141-1/+1
|
* http.c: Fixed compilation warningSteve Holme2014-05-221-1/+1
| | | | warning: suggest braces around empty body in an 'else' statement
* http2: make connection re-use workDaniel Stenberg2014-05-201-0/+2
| | | | | | | | Http2 connections would wrongly get closed after each individual request. Co-authored-by: Tatsuhiro Tsujikawa Bug: http://curl.haxx.se/bug/view.cgi?id=1374
* http2: do the POST Upgrade dance properlyDaniel Stenberg2014-01-301-1/+1
|
* http2.h: provide empty macros for non-http2 buildsDaniel Stenberg2014-01-301-0/+2
|
* http2: s/Curl_http2_request/Curl_http2_request_upgradeDaniel Stenberg2014-01-301-4/+6
| | | | To better reflect its purpose
* http2: handle 101 responses and switch to HTTP2Daniel Stenberg2014-01-291-0/+2
|
* http2: first embryo toward Upgrade:Daniel Stenberg2013-09-071-0/+10
|
* http2: add http2.[ch] and add nghttp2 version outputDaniel Stenberg2013-09-041-0/+32