<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/curl.git/lib/http2.c, branch bagder/configure-dis-https-proxy</title>
<subtitle>github.com: bagder/curl.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/'/>
<entry>
<title>Curl_handler: add 'family' to each protocol</title>
<updated>2020-09-21T21:30:16+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-09-21T11:45:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=6434a73984b2527194d6409021693c7032d17570'/>
<id>6434a73984b2527194d6409021693c7032d17570</id>
<content type='text'>
Makes get_protocol_family() faster and it moves the knowledge about the
"families" to each protocol handler, where it belongs.

Closes #5986
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Makes get_protocol_family() faster and it moves the knowledge about the
"families" to each protocol handler, where it belongs.

Closes #5986
</pre>
</div>
</content>
</entry>
<entry>
<title>http: consolidate nghttp2_session_mem_recv() call paths</title>
<updated>2020-09-10T15:43:47+00:00</updated>
<author>
<name>Laramie Leavitt</name>
<email>laramie.leavitt@gmail.com</email>
</author>
<published>2020-07-03T20:10:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=25a25f45ae55aae510a6de1b5bbcfa7547f5db6c'/>
<id>25a25f45ae55aae510a6de1b5bbcfa7547f5db6c</id>
<content type='text'>
Previously there were several locations that called
nghttp2_session_mem_recv and handled responses slightly differently.
Those have been converted to call the existing
h2_process_pending_input() function.

Moved the end-of-session check to h2_process_pending_input() since the
only place the end-of-session state can change is after nghttp2
processes additional input frames.

This will likely fix the fuzzing error. While I don't have a root cause
the out-of-bounds read seems like a use after free, so moving the
nghttp2_session_check_request_allowed() call to a location with a
guaranteed nghttp2 session seems reasonable.

Also updated a few nghttp2 callsites to include error messages and added
a few additional error checks.

Closes #5648
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously there were several locations that called
nghttp2_session_mem_recv and handled responses slightly differently.
Those have been converted to call the existing
h2_process_pending_input() function.

Moved the end-of-session check to h2_process_pending_input() since the
only place the end-of-session state can change is after nghttp2
processes additional input frames.

This will likely fix the fuzzing error. While I don't have a root cause
the out-of-bounds read seems like a use after free, so moving the
nghttp2_session_check_request_allowed() call to a location with a
guaranteed nghttp2 session seems reasonable.

Also updated a few nghttp2 callsites to include error messages and added
a few additional error checks.

Closes #5648
</pre>
</div>
</content>
</entry>
<entry>
<title>h2: repair trailer handling</title>
<updated>2020-08-03T21:43:24+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-08-03T10:19:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=7f187d897c000ea64d38aa29026a7837a88427df'/>
<id>7f187d897c000ea64d38aa29026a7837a88427df</id>
<content type='text'>
The previous h2 trailer fix in 54a2b63 was wrong and caused a
regression: it cannot deal with trailers immediately when read since
they may be read off the connection by the wrong 'data' owner.

This change reverts the logic back to gathering all trailers into a
single buffer, like before 54a2b63.

Reported-by: Tadej Vengust
Fixes #5663
Closes #5769
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous h2 trailer fix in 54a2b63 was wrong and caused a
regression: it cannot deal with trailers immediately when read since
they may be read off the connection by the wrong 'data' owner.

This change reverts the logic back to gathering all trailers into a
single buffer, like before 54a2b63.

Reported-by: Tadej Vengust
Fixes #5663
Closes #5769
</pre>
</div>
</content>
</entry>
<entry>
<title>CURL_PUSH_ERROROUT: allow the push callback to fail the parent stream</title>
<updated>2020-07-15T22:24:29+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-07-15T22:24:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=954cd3eb482a00fda610ca64498d50db2b2e8298'/>
<id>954cd3eb482a00fda610ca64498d50db2b2e8298</id>
<content type='text'>
... by adding support for a new dedicated return code.

Suggested-by: Jonathan Cardoso
Assisted-by: Erik Johansson
URL: https://curl.haxx.se/mail/lib-2020-06/0099.html
Closes #5636
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... by adding support for a new dedicated return code.

Suggested-by: Jonathan Cardoso
Assisted-by: Erik Johansson
URL: https://curl.haxx.se/mail/lib-2020-06/0099.html
Closes #5636
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: only do the *done() cleanups for HTTP</title>
<updated>2020-07-03T23:13:50+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-07-03T22:10:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=69bfde451597bfede70d1d716584b67ebccbd4f6'/>
<id>69bfde451597bfede70d1d716584b67ebccbd4f6</id>
<content type='text'>
Follow-up to ef86daf4d3

Closes #5650
Fixes #5646
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up to ef86daf4d3

Closes #5650
Fixes #5646
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: close the http2 connection when no more requests may be sent</title>
<updated>2020-07-03T09:16:48+00:00</updated>
<author>
<name>Laramie Leavitt</name>
<email>laramie.leavitt@gmail.com</email>
</author>
<published>2020-07-02T23:46:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=ef86daf4d39e99b227d42bb712000c9adfdbdf76'/>
<id>ef86daf4d39e99b227d42bb712000c9adfdbdf76</id>
<content type='text'>
Well-behaving HTTP2 servers send two GOAWAY messages. The first
message is a warning that indicates that the server is going to
stop accepting streams. The second one actually closes the stream.

nghttp2 reports this state (and the other state of no more stream
identifiers) via the call nghttp2_session_check_request_allowed().
In this state the client should not create more streams on the
session (tcp connection), and in curl this means that the server
has requested that the connection is closed.

It would be also be possible to put the connclose() call into the
on_http2_frame_recv() function that triggers on the GOAWAY message.

This fixes a bug seen when the client sees the following sequence of
frames:

// advisory GOAWAY
HTTP2 GOAWAY [stream-id = 0, promised-stream-id = -1]
... some additional frames

// final GOAWAY
HTTP2 GOAWAY [stream-id = 0, promised-stream-id = N ]

Before this change, curl will attempt to reuse the connection even
after the last stream, will encounter this error:

* Found bundle for host localhost: 0x5595f0a694e0 [can multiplex]
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (::1) port 10443 (#0)
* Using Stream ID: 9 (easy handle 0x5595f0a72e30)
&gt; GET /index.html?5 HTTP/2
&gt; Host: localhost:10443
&gt; user-agent: curl/7.68.0
&gt; accept: */*
&gt;
* stopped the pause stream!
* Connection #0 to host localhost left intact
curl: (16) Error in the HTTP2 framing layer

This error may posion the connection cache, causing future requests
which resolve to the same curl connection to go through the same error
path.

Closes #5643
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Well-behaving HTTP2 servers send two GOAWAY messages. The first
message is a warning that indicates that the server is going to
stop accepting streams. The second one actually closes the stream.

nghttp2 reports this state (and the other state of no more stream
identifiers) via the call nghttp2_session_check_request_allowed().
In this state the client should not create more streams on the
session (tcp connection), and in curl this means that the server
has requested that the connection is closed.

It would be also be possible to put the connclose() call into the
on_http2_frame_recv() function that triggers on the GOAWAY message.

This fixes a bug seen when the client sees the following sequence of
frames:

// advisory GOAWAY
HTTP2 GOAWAY [stream-id = 0, promised-stream-id = -1]
... some additional frames

// final GOAWAY
HTTP2 GOAWAY [stream-id = 0, promised-stream-id = N ]

Before this change, curl will attempt to reuse the connection even
after the last stream, will encounter this error:

* Found bundle for host localhost: 0x5595f0a694e0 [can multiplex]
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (::1) port 10443 (#0)
* Using Stream ID: 9 (easy handle 0x5595f0a72e30)
&gt; GET /index.html?5 HTTP/2
&gt; Host: localhost:10443
&gt; user-agent: curl/7.68.0
&gt; accept: */*
&gt;
* stopped the pause stream!
* Connection #0 to host localhost left intact
curl: (16) Error in the HTTP2 framing layer

This error may posion the connection cache, causing future requests
which resolve to the same curl connection to go through the same error
path.

Closes #5643
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: fix nghttp2_strerror -&gt; nghttp2_http2_strerror in debug messages</title>
<updated>2020-07-02T21:37:28+00:00</updated>
<author>
<name>Jeremy Maitin-Shepard</name>
<email>jbms@google.com</email>
</author>
<published>2020-07-02T16:47:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=31f0e864c799a8f1bdbefdc3a618da0be1f47073'/>
<id>31f0e864c799a8f1bdbefdc3a618da0be1f47073</id>
<content type='text'>
Confusingly, nghttp2 has two different error code enums:

- nghttp2_error, to be used with nghttp2_strerror
- nghttp2_error_code, to be used with nghttp2_http2_strerror

Closes #5641
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Confusingly, nghttp2 has two different error code enums:

- nghttp2_error, to be used with nghttp2_strerror
- nghttp2_error_code, to be used with nghttp2_http2_strerror

Closes #5641
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: set the correct URL in pushed transfers</title>
<updated>2020-06-25T07:31:21+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-06-23T12:28:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=646cc574f0b72723906224824a57cd37ee88e9df'/>
<id>646cc574f0b72723906224824a57cd37ee88e9df</id>
<content type='text'>
...previously CURLINFO_EFFECTIVE_URL would report the URL of the
original "mother transfer", not the actually pushed resource.

Reported-by: Jonathan Cardoso Machado
Fixes #5589
Closes #5591
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...previously CURLINFO_EFFECTIVE_URL would report the URL of the
original "mother transfer", not the actually pushed resource.

Reported-by: Jonathan Cardoso Machado
Fixes #5589
Closes #5591
</pre>
</div>
</content>
</entry>
<entry>
<title>urldata: let the HTTP method be in the set.* struct</title>
<updated>2020-06-02T14:30:36+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-06-01T20:58:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=9c845be2797e2047547ec247cb037471aeb48bb0'/>
<id>9c845be2797e2047547ec247cb037471aeb48bb0</id>
<content type='text'>
When the method is updated inside libcurl we must still not change the
method as set by the user as then repeated transfers with that same
handle might not execute the same operation anymore!

This fixes the libcurl part of #5462

Test 1633 added to verify.

Closes #5499
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the method is updated inside libcurl we must still not change the
method as set by the user as then repeated transfers with that same
handle might not execute the same operation anymore!

This fixes the libcurl part of #5462

Test 1633 added to verify.

Closes #5499
</pre>
</div>
</content>
</entry>
<entry>
<title>url: alloc the download buffer at transfer start</title>
<updated>2020-05-30T21:14:33+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-05-28T16:30:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=c4e6968127e876b01e5e0b4b7cdbc49d5267530c'/>
<id>c4e6968127e876b01e5e0b4b7cdbc49d5267530c</id>
<content type='text'>
... and free it as soon as the transfer is done. It removes the extra
alloc when a new size is set with setopt() and reduces memory for unused
easy handles.

In addition: the closure_handle now doesn't use an allocated buffer at
all but the smallest supported size as a stack based one.

Closes #5472
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... and free it as soon as the transfer is done. It removes the extra
alloc when a new size is set with setopt() and reduces memory for unused
easy handles.

In addition: the closure_handle now doesn't use an allocated buffer at
all but the smallest supported size as a stack based one.

Closes #5472
</pre>
</div>
</content>
</entry>
</feed>
