HoneyryderChuck
1b97001b5f
moved check o expect-100 response to the headers callback, as in http2, it doesn't close the stream when waiting for the body (I have no idea how this was working)
2020-04-18 17:43:21 +01:00
HoneyryderChuck
1e66528925
emit error for http1 parser errors as well
2020-04-12 03:32:04 +01:00
HoneyryderChuck
9d6f31d940
calculate interests down to connection and parser
...
by analyzing all of the data down to the parser, one can estimate better
whether io wants to read/write/both, thereby avoiding spurious wakeups.
This also greatly simplifies the monitor API, and solves the 100% CPU
utilization issue.
2020-04-12 03:32:04 +01:00
HoneyryderChuck
0136200b85
allow parser to close connection by passing a special flag
...
this works for http/1, where one can close the socket immediately.
2020-04-12 03:32:04 +01:00
HoneyryderChuck
79d71dcc92
re-set the http2 max streams on settings negotiation.
...
there was a bug where the max streams in the connection would trigger a
stream limit exceeded, however the check done was based on active
streams that max requests variable from the httpx connection. This is
wrong when peer negotiates more concurrent streams, but is checking the
stream limit against the wrong value received from httpx.
2020-04-12 03:32:04 +01:00
HoneyryderChuck
d2a3c51834
parser#consume: skip fully buffered requests
2020-04-05 04:26:43 +01:00
HoneyryderChuck
a78f7afac6
removed label parameter from logs, in order to avoid needless string allocations by default
2020-03-31 09:42:52 +01:00
HoneyryderChuck
2b7fc18289
http2: use whatever the user sets for max requests
2020-03-21 17:51:59 +00:00
HoneyryderChuck
1bde88e755
force http2 new parser on connection reset
2020-03-21 12:46:46 +00:00
HoneyryderChuck
70bf2a0e5a
new option: :max_requests
...
This is the max number of requests that can go on a connection. By
default, it'll be 100 for HTTP/1, and whatever the peer advertises as
MAX_CONCURRENT_STREAMS in HTTP/2 (usually 100).
If one would like to disable and reuse the socket beyond the advertised
number (sometimes the servers allow this), you can set this to
Float::INFINITY
2020-03-14 23:59:04 +00:00
HoneyryderChuck
ee946d3d2c
fixing downgrade of MAX_CONCURRENT_STREAMS
...
in a situation where this was set by default to 200, and when receiving
settings with a lower value (let's say, 100), the connection didn't know
what to do with the remaining 100, and this was left hanging; now, it
signalizes the session that we need an extra connection, and this will
pick up the remaining and establish a new connection.
2020-03-14 22:35:32 +00:00
HoneyryderChuck
885df66067
setting up max requests for http2 connections; these will be set to the remote max allowed streams, when setting is received; max_concurrent_requests goes back to what it was
2020-03-14 22:35:32 +00:00
HoneyryderChuck
d5bd1c7249
do not set concurrent requests at the options level, instead define it depending of the protocol
2020-03-14 22:35:32 +00:00
HoneyryderChuck
745d95c7e0
close http2 connection as soon as it served all possible requests; this will make the persistent plugin account for resources better
2020-03-07 23:04:29 +00:00
HoneyryderChuck
4348f49c69
http2: only goaway from connection once
2020-03-07 22:56:13 +00:00
HoneyryderChuck
a4c0096cd8
connection emits the exhausted event when the strem limit has been achieved on an HTTP/2 connection
...
this happens when the requests are enqueued before the connection is
negotiated, and then one has too many requests enqueued.
2020-03-07 00:53:34 +00:00
HoneyryderChuck
1ad91d898e
implemented Connection#exhausted?
...
an exhausted connection can't service more requests, therefore is
unmatchable and can't enqueue more requests to the parser.
2020-03-07 00:53:34 +00:00
HoneyryderChuck
41ca9f57b1
removing dead code
2020-02-15 11:48:11 +00:00
HoneyryderChuck
056b922114
Merge branch 'origin-frame' into 'master'
...
HTTP/2 Origin frame
See merge request honeyryderchuck/httpx!58
2019-12-21 16:49:22 +00:00
HoneyryderChuck
e6ec9cb43e
adding support for the origin frame
2019-12-14 16:48:23 +00:00
HoneyryderChuck
e30469f8a3
fixing usage of active_stream_count, which changed in http-2-next, and never decrements; using local active stream count instead
2019-11-30 14:59:18 +00:00
HoneyryderChuck
be975cef87
emit error on http2 if error happens before streams are ever created
2019-11-19 23:29:39 +00:00
HoneyryderChuck
b969a1afe0
switched from http-2 to http-2-next
2019-11-17 02:21:00 +00:00
HoneyryderChuck
6a095c21e9
do not raise exception when connection/stream is reset with no error
2019-10-08 00:35:57 +01:00
HoneyryderChuck
2da56ce9af
fix: keep connection alive if HTTP/1.1 and there is connection-related
...
header;
this was wrongly closing connections for HTTP/1.1 connections which
didn't send a "Connection" header; according to spec, the default is
"Keep-Alive", contrary to HTTP/1.0
2019-05-15 14:45:06 +00:00
HoneyryderChuck
ae859f743f
request exposes options: this allows responses to be created with the proper set of options, instead of the connection options, which is wrong
2019-05-06 11:56:11 +00:00
HoneyryderChuck
ce9f55c96e
pool: allowing it to load more than one resolver per pool, depending on connection conditions; still reusing it whenever possible (right now, per type, which is still wrong, if we want to connect, let's say, to more than a different DNS server with the same type)
2019-04-27 15:51:37 +00:00
HoneyryderChuck
39aa1375f4
if request done sending the body, consider it done
2019-03-17 12:27:23 +00:00
HoneyryderChuck
935a58e11e
Channel -> Connection
2019-03-16 15:59:19 +00:00
HoneyryderChuck
5d8c65cfe3
Channel -> Connection
2019-03-16 15:23:55 +00:00
HoneyryderChuck
85f08f0c7a
changed the resource structure
2017-11-28 14:36:18 +00:00
HoneyryderChuck
46a1223187
addest tests for headers/request/response
2017-11-28 14:00:16 +00:00
HoneyryderChuck
0bcfc7fbe2
added first structure draft, resource names to change, but... it works\! to nghttp2
2017-11-28 01:24:24 +00:00