Commit Graph

19519 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa d261652d42 http2: Fix streams get stuck
This commit fixes the bug that streams get stuck if stream gets some
DATA, and stream->closed becomes true at the same time.  Previously,
in this condition, after we processed DATA, we are going to try to
read data from underlying transport, but there is no data, and gets
EAGAIN.  There was no code path to evaludate stream->closed.
2015-05-18 08:57:18 +02:00
Daniel Stenberg 74a4bd5ecd http2: store incoming h2 SETTINGS 2015-05-18 08:57:18 +02:00
Daniel Stenberg 591a6933da pipeline: move function to pipeline.c and make static
... as it was only used from there.
2015-05-18 08:57:18 +02:00
Daniel Stenberg e91aedd840 IsPipeliningPossible: http2 can always "pipeline" (multiplex) 2015-05-18 08:57:18 +02:00
Daniel Stenberg ee3ad233a2 http2: remove debug logging from on_frame_recv 2015-05-18 08:57:18 +02:00
Daniel Stenberg 70b5b698b0 http2: remove the closed check in http2_recv
With the "drained" functionality we can get here slightly asynchronously
so the stream have have been closed but there is pending data left to
read.
2015-05-18 08:57:18 +02:00
Daniel Stenberg a28734be09 http2: bump the h2 buffer to 8K 2015-05-18 08:57:18 +02:00
Daniel Stenberg 5252f13dfa http2: Curl_read should not use the single buffer
... as it does for pipelining when we're multiplexing, as we need the
different buffers to store incoming data correctly for all streams.
2015-05-18 08:57:18 +02:00
Daniel Stenberg 153f940198 http2: more debug outputs 2015-05-18 08:57:18 +02:00
Daniel Stenberg f4b8b39881 http2: leave WAITPERFORM when conn is multiplexed
No need to wait for our "spot" like for pipelining
2015-05-18 08:57:18 +02:00
Daniel Stenberg 01e1bdb10c http2: force "drainage" of streams
... which is necessary since the socket won't be readable but there is
data waiting in the buffer.
2015-05-18 08:57:17 +02:00
Daniel Stenberg 7bbac214f5 http2: move the mem+len pair to the stream struct 2015-05-18 08:57:17 +02:00
Daniel Stenberg 84c6b6561f http2: more stream-oriented data, stream ID 0 is for connections 2015-05-18 08:57:17 +02:00
Daniel Stenberg 2c238ea1fc http2: move lots of state data to the 'stream' struct
... from the connection struct. The stream one being the 'struct HTTP'
which is kept in the SessionHandle struct (easy handle).

lookup streams for incoming frames in the stream hash, hashing is based
on the stream id and we get the SessionHandle for the incoming stream
that way.
2015-05-18 08:57:17 +02:00
Daniel Stenberg 5fe71975e4 HTTP: partial start at fixing up hash-lookups on http2 frame receival 2015-05-18 08:57:17 +02:00
Daniel Stenberg 77f1029ecd http: a stream hash for h2 multiplexing 2015-05-18 08:57:17 +02:00
Daniel Stenberg 7957d2eb92 http: a stream hash for h2 multiplexing 2015-05-18 08:57:17 +02:00
Daniel Stenberg 47caff7bdf http2: debug log when receiving unexpected stream_id 2015-05-18 08:54:54 +02:00
Daniel Stenberg d6440d7366 http2: move stream_id to the HTTP struct (per-stream) 2015-05-18 08:54:54 +02:00
Daniel Stenberg f858624052 Curl_http2_setup: only do it once and enable multiplex on the server
Once we know we are HTTP/2 enabled we know the server can multiplex.
2015-05-18 08:54:54 +02:00
Daniel Stenberg 6e6b02f398 http: switch on "pipelining" (multiplexing) for HTTP/2 servers
... and do not blacklist any.
2015-05-18 08:54:54 +02:00
Daniel Stenberg 5fa82ca56f README.pipelining: removed
All the details mentioned here are better documented in man pages
2015-05-15 22:34:12 +02:00
Dan Fandrich 1c01cee601 build: removed bundles.c from make files
This file was removed in commit fd137786
2015-05-14 14:55:48 +02:00
Daniel Stenberg 750d678c0e Curl_conncache_add_conn: fix memory leak on OOM 2015-05-14 14:06:44 +02:00
Daniel Stenberg a6af3df660 CURLMOPT_MAX_HOST_CONNECTIONS: host = host name + port number 2015-05-12 23:47:01 +02:00
Daniel Stenberg 2a746f6c28 conncache: keep bundles on host+port bases, not only host names
Previously we counted all connections to a specific host name and that
would be used for the CURLMOPT_MAX_HOST_CONNECTIONS check for example,
while servers on different port numbers are normally considered
different "origins" on the web and should thus be considered different
hosts.
2015-05-12 23:40:10 +02:00
Daniel Stenberg fd137786e5 bundles: merged into conncache.c
All the existing Curl_bundle* functions were only ever used from within
the conncache.c file, so I moved them over and made them static (and
removed the Curl_ prefix).
2015-05-12 23:21:33 +02:00
Daniel Stenberg b419e7ae0c hostcache: made all host caches use structs, not pointers
This avoids unnecessary dynamic allocs and as this also removed the last
users of *hash_alloc() and *hash_destroy(), those two functions are now
removed.
2015-05-12 09:46:53 +02:00
Daniel Stenberg d37e0160c2 multi: converted socket hash into non-allocated struct
avoids extra dynamic allocation
2015-05-12 09:28:37 +02:00
Daniel Stenberg 640296c95d connection cache: avoid Curl_hash_alloc()
... by using plain structs instead of pointers for the connection cache,
we can avoid several dynamic allocations that weren't necessary.
2015-05-12 09:15:02 +02:00
Daniel Stenberg c4d6f9163a proxy: add newline to info message 2015-05-08 15:56:25 +02:00
Patrick Monnerat c720cd6356 FTP: fix dangling conn->ip_addr dereference on verbose EPSV. 2015-05-08 15:28:48 +02:00
Patrick Monnerat 3377e692ee FTP: Make EPSV use the control IP address rather than the original host.
This ensures an alternate address is not used.
Does not apply to proxy tunnel.
2015-05-08 15:28:48 +02:00
Alessandro Ghedini 5bf472fd39 tool_help: fix formatting for --next option 2015-05-08 14:44:15 +02:00
Egon Eckert 8936a23f51 opts: improved the TCP keepalive examples 2015-05-08 08:27:19 +02:00
Jay Satiro f010f3e3ca winbuild: Document the option used to statically link the CRT
- Document option RTLIBCFG (runtime library configuration).

Bug: https://github.com/bagder/curl/issues/254
Reported-by: Bert Huijben
2015-05-08 01:09:57 -04:00
Orgad Shaneh 33058a1dc3 netrc: Read in text mode when cygwin
Use text mode when cygwin to eliminate trailing carriage returns.

Bug: https://github.com/bagder/curl/pull/258
2015-05-06 02:34:31 -04:00
Patrick Monnerat 9fcc297ff3 OS400: Add SPNEGO service name options to ILE/RPG binding. 2015-05-05 14:05:41 +02:00
Daniel Stenberg 8a35211f3e curl_multi_info_read.3: fix typo
Reported-by: Liviu Chircu
2015-05-04 23:45:25 +02:00
Daniel Stenberg fa08362a5f MANUAL: language fix
Reported-by: Fred Stluka
Bug: https://github.com/bagder/curl/issues/255
2015-05-04 14:17:28 +02:00
Alessandro Ghedini a5e09e9eea gtls: properly retrieve certificate status
Also print the revocation reason if appropriate.
2015-05-04 13:42:45 +02:00
Daniel Stenberg 86bc654532 OpenSSL: conditional check for SSL3_RT_HEADER
The symbol is fairly new.

Reported-by: Kamil Dudka
2015-05-04 13:29:34 +02:00
Daniel Stenberg 690317aae2 openssl: skip trace outputs for ssl_ver == 0
The OpenSSL trace callback is wonderfully undocumented but given a
journey in the source code, it seems the cases were ssl_ver is zero
doesn't follow the same pattern and thus turned out confusing and
misleading. For now, we skip doing any CURLINFO_TEXT logging on those
but keep sending them as CURLINFO_SSL_DATA_OUT/IN.

Also, I added direction to the text info and I edited some functions
slightly.

Bug: https://github.com/bagder/curl/issues/219
Reported-by: Jay Satiro, Ashish Shukla
2015-05-04 12:27:59 +02:00
Marc Hoersken 3c104448d6 schannel.c: Small changes 2015-05-02 22:21:25 +02:00
Marc Hoersken ae8387b91c schannel.c: Improve code path and readability 2015-05-02 20:14:53 +02:00
Marc Hoersken d93619ca5d schannel.c: Improve error and return code handling upon aa99a63f03 2015-05-02 20:05:22 +02:00
Chris Araman aa99a63f03 schannel: fix regression in schannel_recv
https://github.com/bagder/curl/issues/244

Commit 145c263 changed the behavior when Curl_read_plain returns
CURLE_AGAIN. We now handle CURLE_AGAIN and SEC_I_CONTEXT_EXPIRED
correctly.
2015-05-02 18:54:13 +02:00
Marc Hoersken 4bb8bad964 Bug born in changes made several days ago 9a91e80.
Commit: https://github.com/bagder/curl/commit/926cb9f
Reported-by: Ray Satiro
2015-05-01 09:39:34 +02:00
Michael Osipov b6c9f5b7ae configure: remove missing and make it autogenerate
The missing file has not been autogenerated because a temporary fix was
employed in acinclude.m4 which blocked update. Removed that fix and a recent
version of missing is copied to build root.
2015-04-30 18:40:35 +02:00
Michael Osipov 4335b86a10 acinclude.m4: fix test for default CA cert bundle/path
test(1) on HP-UX requires a single equals sign and fails with two.
Let's use one and make every OS happy.
2015-04-30 18:36:27 +02:00