HoneyryderChuck
a650e622ca
do not close the connection pool, if there's nothing to close
2020-11-22 22:32:38 +00:00
HoneyryderChuck
7e26c86dc1
really closing a response (won't buffer stuff anymore after being closed)
2020-11-22 15:55:44 +00:00
HoneyryderChuck
047875864b
closing the response when not carrying it forward
2020-11-22 15:55:44 +00:00
HoneyryderChuck
fecdd120f8
fixing h2c by not calling the #to_s from response, which now touches the pool in such conditions; we want to flush the buffer, so that's what we do
2020-11-22 15:55:43 +00:00
HoneyryderChuck
b5a971b03b
unnecessary var
2020-11-19 09:44:55 +00:00
HoneyryderChuck
c8663e52ee
do not show IDN message for normal ascii hostnames
2020-11-19 09:44:43 +00:00
HoneyryderChuck
777ab21050
making WRITE/READ more accurate by emitting them at the socket (UDP/TCP) level
2020-11-19 09:44:29 +00:00
HoneyryderChuck
24088decf3
fixing rubocop for remaining ruby versions
2020-11-07 16:55:23 +00:00
HoneyryderChuck
ea4ac5bfb9
fix constant usage
2020-11-07 16:17:46 +00:00
HoneyryderChuck
2d078de0a4
non-ascii: force utf8 encoding for all
2020-11-07 16:12:04 +00:00
HoneyryderChuck
b47b9de745
for unescaping of non ascii domain to binary (JRuby converts to UTF-8)
2020-11-07 15:46:08 +00:00
HoneyryderChuck
8f495f37d2
avoid using URI.escape directly
2020-11-07 15:36:21 +00:00
HoneyryderChuck
86f1db5bf0
disabling IDN support for ruby < 2.3
2020-11-07 15:36:21 +00:00
HoneyryderChuck
1b26977d16
updated rubocop to 1.0.0 on possible rubies, making the necessary changes
2020-11-07 15:36:21 +00:00
HoneyryderChuck
50b65200ed
using the new uri method at the appropriate places; adding some logging when resolving, to correctly identify when translation of IDN hostname happens
2020-11-07 01:41:05 +00:00
HoneyryderChuck
f9c1d7de44
extending URI to include non ascii hostname attribute; added own custom uri initialization function, which performs additional checks when needed
2020-11-07 01:41:05 +00:00
HoneyryderChuck
cbfb5c968e
moving domain_name module to core httpx, as the punycode IDN translation will be needed at this layer
2020-11-07 01:34:48 +00:00
HoneyryderChuck
e271c45582
fixing frozen string issues with punycode, and the String#unicode_normalize
2020-11-06 23:06:39 +00:00
HoneyryderChuck
5f735cc6f5
Merge branch 'issue-50' into 'master'
...
rate limiter plugin
See merge request honeyryderchuck/httpx!99
2020-11-06 17:25:06 +00:00
HoneyryderChuck
62467ff5c5
persistent and retries plugin now work well together
...
When persistent and retries are loaded separately, the options won't be
just overwritten; instead, changes will be kept, and max_retries will be
the max value of what both plugins load (in case the user sets its own
option)
2020-11-05 16:20:16 +00:00
HoneyryderChuck
048501e940
adding and integrating the new cookie modules for: store, jar, cookie, and domain name
2020-11-04 00:32:01 +00:00
HoneyryderChuck
959429b386
improved cookies testing, to test also the array-of-cookie-hashes case; does not accept a string anymore, as besides untested, it wasn't working properly
2020-11-03 16:33:11 +00:00
HoneyryderChuck
1b068aca21
removing http-cookie
2020-11-03 16:33:11 +00:00
HoneyryderChuck
01552757a0
supporting the retry-after header for redirections as well
2020-10-31 14:15:28 +00:00
HoneyryderChuck
1ad2e9cbcf
implemented the rate limiter plugin
2020-10-31 14:15:28 +00:00
HoneyryderChuck
1934e84bcd
added the rate limiter tests
2020-10-31 01:08:44 +00:00
HoneyryderChuck
e94b8407e5
do not wait to close connections which haven't been opened yet
2020-10-31 01:08:00 +00:00
HoneyryderChuck
091ab764c9
fixed the endless loop on exception for good
...
type check errors were sometimes causing the request loop to stall. This
was due to it not being handled in pool, and the respective requests not
being reaped. On exit, the session would try to close these connections,
but they weren't available anymore, causing it to happen. We were
already doing this for Interrupt, we're just extending it for all
non-StandarError exceptions
2020-10-30 16:19:18 +00:00
HoneyryderChuck
805096b721
signing the http1 parser as well
2020-10-30 16:19:18 +00:00
HoneyryderChuck
96eaf1ef05
moar coverage
2020-10-30 16:19:18 +00:00
HoneyryderChuck
0fe4040da0
improved the parser coverage
...
* removed needless tests;
* testing error paths;
* removed some unreachable code;
* removed branching of #parse calls;
2020-10-30 16:19:18 +00:00
HoneyryderChuck
e02e8029ad
made encoder API more consistent across request body encoders
2020-10-30 16:19:18 +00:00
HoneyryderChuck
b24ad8b605
refactored the compression plugins to use inflater/deflater API
...
during the typing sessions, it was clear that there was some confusion
around the decoder/encoder concept as well as API convolution, i.e. zlib
implementation details leaked to the main compression module.
Therefore, interfaces for Deflater/Inflater were build from the ground
up, and the modules were rewritten accordingly.
2020-10-30 16:19:18 +00:00
HoneyryderChuck
04e8f04893
reorganizing and removind code
2020-10-30 16:19:18 +00:00
HoneyryderChuck
33487d03d5
fixing build_requests signatures, as 4 top parameters aren't supported, and one calls map although one expects #each
2020-10-30 16:19:18 +00:00
HoneyryderChuck
cb4a30d7f3
removed some more unnnecessary apis
...
removed unused method, that shouldn't be there
remove unnecessary methods from the error response
2020-10-30 16:19:18 +00:00
HoneyryderChuck
ec8d400081
skip default assignment, so that typing works better at that level
2020-10-30 16:19:18 +00:00
HoneyryderChuck
7c4ef3b12c
plugin: pass block further, also request: do not convert to string, nonw that we'll have signatures
2020-10-27 17:00:44 +00:00
HoneyryderChuck
f6b775639f
bumped version to 0.9.0
2020-10-08 10:47:24 +01:00
HoneyryderChuck
978a5ffa22
promoting build_request to public API, thereby allowing users to create request objects and pass them on to #send
2020-10-06 16:24:45 +01:00
HoneyryderChuck
9f33518850
options.merge: return the same object if the one being merged is empty
2020-10-06 16:23:47 +01:00
HoneyryderChuck
019b41a70c
removed the nodocs
2020-10-03 00:28:17 +01:00
HoneyryderChuck
e382c1d27f
bumped to 0.8.2
2020-05-06 14:07:10 +01:00
HoneyryderChuck
2a93eae907
use SecureRandom.gen_random, which is also supported in ruby 2.3, and is where SecureRandom.bytes defers to
2020-05-06 13:47:57 +01:00
HoneyryderChuck
94074088b8
keep_alive: close the http/2 connection if ack ping frame doesn't return the same payload as the sent ping
2020-05-06 13:47:14 +01:00
HoneyryderChuck
b9809077f5
Merge branch 'issue-89' into 'master'
...
Ping connection on keep alive timeout expired
See merge request honeyryderchuck/httpx!88
2020-05-06 11:38:06 +00:00
HoneyryderChuck
5a99c2f331
Merge branch 'issue-88' into 'master'
...
HTTP/1: connection: close when necessary.
See merge request honeyryderchuck/httpx!87
2020-05-06 08:50:16 +00:00
HoneyryderChuck
4dadbfe534
require resolvers instead of autoloading; we ain't saving that much by autoloading them, and there is a thread-safety penalty manifesting from time to time in the CI, when initiating the resolver and the initialize method isn't there yet
2020-05-04 10:58:29 +01:00
HoneyryderChuck
ecf0960d06
mocking ping behaviour in HTTP/1, as: just admit defeat and open a new connection. There is no reliable way to ping an HTTP/1 connection without fully buffering a request
2020-05-03 16:29:37 +01:00
HoneyryderChuck
bb310dc106
making the connection ping when keep alive timeout is exceeded; this way if the connection is still available, it's reused
2020-05-03 16:28:58 +01:00