176 Commits

Author SHA1 Message Date
HoneyryderChuck
da97b19161 proxyssl: resetting the ip and port, as the main class will try to eager load it (which is in itself already bad, because it's at least one dns request, and might fail if not possible to query, which is what usually happens behind a proxy) 2017-12-21 17:02:45 +02:00
HoneyryderChuck
14d32ef52a proxy: added support to HTTP_PROXY and family; for this, one is binding the proxy channel late in the game, based on the request uris 2017-12-21 17:01:28 +02:00
HoneyryderChuck
c0189c46e6 closing parser in transition call 2017-12-21 16:24:36 +02:00
HoneyryderChuck
f9d6ad0fd0 requests: improved headline granularity; removed some proxy request header logic 2017-12-21 16:24:24 +02:00
HoneyryderChuck
44acebf424 proxy channel is now a state machine 2017-12-21 16:12:43 +02:00
HoneyryderChuck
359a74437a removed unused variables 2017-12-21 16:06:38 +02:00
HoneyryderChuck
d68abd5fbc proxy: better naming for modules 2017-12-21 15:36:43 +02:00
HoneyryderChuck
acf0641e0e moving ProxySSL to plugin 2017-12-21 15:36:19 +02:00
HoneyryderChuck
af3a81b7a2 proxy: added multiple possible proxies to choose (for now it's a static list, but these might become unavailable, added dynamic fetching later) 2017-12-21 15:35:58 +02:00
HoneyryderChuck
48d8714225 added support for https proxy connect flow; removed the proxy server tests, as I found a list of public proxies, which are good enough to test around; added a bit more logging 2017-12-21 15:21:58 +02:00
HoneyryderChuck
48e55a7ca2 removing :proxy options from base class, adding them with the plugin 2017-12-20 19:14:19 +02:00
HoneyryderChuck
9729fa0d82 ::IO for the top class 2017-12-20 19:13:48 +02:00
HoneyryderChuck
defe140466 proxy: http-proxying is now possible; on connection, a proxy channel is initialized, which should match against ALL requests, so this means that, by passing a proxy, one is saying that ALL requests on that client are proxied; a lot of object monkey-patching takes place, but this should be alright, as these objects should be long-lived in the grand scheme of things (if there will only be one channel, there will also be only one parser, etc etc) 2017-12-20 19:00:21 +02:00
HoneyryderChuck
36ce3851d1 parser: isolating some logic, so that it can be more easily overridden; these have to make sense, obviously 2017-12-20 18:57:50 +02:00
HoneyryderChuck
7b98053cf2 space 2017-12-20 18:56:50 +02:00
HoneyryderChuck
f375a9bbb9 registry: passing along registers to subclasses 2017-12-20 18:56:29 +02:00
HoneyryderChuck
6d7c3d73b6 testing on /get 2017-12-20 18:56:12 +02:00
HoneyryderChuck
cd784e43d0 added first draft of proxy plugin: connection gets extended; proxy creates a proxy channel, which initializes with a separate parser and an initial connect request; it's still failing, though 2017-12-20 17:29:01 +02:00
HoneyryderChuck
01d41b076e channel: register happens separately 2017-12-20 17:27:30 +02:00
HoneyryderChuck
9ee00921f8 added proxy tests; the tests use local nghttpx as proxy, which means this'll become a dependency 2017-12-20 17:26:57 +02:00
HoneyryderChuck
eb173e0217 added IO module to register IO types; now one needs to explicitly call ::IO for top-level 2017-12-20 12:11:01 +02:00
HoneyryderChuck
a47ba100f5 capping max timeout to 30 seconds 2017-12-19 14:20:14 +02:00
HoneyryderChuck
87f949894b fixed header initialization (specifically in the case when it is initialized with two set-cookie incoming fields) 2017-12-19 13:07:05 +02:00
HoneyryderChuck
193828527b added debug_level option, which can make logs more verbose 2017-12-19 13:06:51 +02:00
HoneyryderChuck
0f42c368c7 Get first, head later 2017-12-19 13:06:24 +02:00
HoneyryderChuck
45bd2a11c7 fixing the leakage of altered resource classes to the main default options 2017-12-19 13:06:09 +02:00
HoneyryderChuck
0c307c82c3 removing the cookies test from options 2017-12-19 13:05:54 +02:00
HoneyryderChuck
a179fe7aa0 http-cookie is now a dev dep 2017-12-19 13:05:34 +02:00
HoneyryderChuck
48b6faa2c3 options: removing the cookies stuff by default there 2017-12-19 13:05:21 +02:00
HoneyryderChuck
3c72a20d46 removing usage of ** params, as this forces typecast to hash, and one loses the options silently keeping the object passed in init, which is a big part of the plugins 2017-12-19 13:05:07 +02:00
HoneyryderChuck
95508ac4d5 allow to build requests without sending them 2017-12-18 16:05:20 +02:00
HoneyryderChuck
d9f2632a67 parser is empty when there are no requests as well 2017-12-18 16:04:53 +02:00
HoneyryderChuck
88b2c9370c added plugin to top-level chainable; added plural version, to load multiple plugins 2017-12-18 16:04:39 +02:00
HoneyryderChuck
eccea7c443 improve HTTP/1 log messages 2017-12-18 13:43:09 +02:00
HoneyryderChuck
37f97005fb Merge branch 'bufferz' into 'master'
Bufferz

Closes #2

See merge request honeyryderchuck/httpx!3
2017-12-15 10:56:48 +00:00
HoneyryderChuck
f99893839d improved inspection of IO objects 2017-12-15 10:56:14 +00:00
HoneyryderChuck
da8bccb254 with_body: moved assertions to helper methods 2017-12-15 08:45:21 +00:00
HoneyryderChuck
9ea8e6f309 removed keep alive explicit timeout (it's just part of the operation flow) 2017-12-14 11:10:21 +00:00
HoneyryderChuck
8293350d26 jruby fix: http_parser (still) calls the header callback twice for chunked bodies, work around that 2017-12-14 01:21:44 +00:00
HoneyryderChuck
9673825673 jruby support: do not multi-assign in condition (it will not compile) 2017-12-14 01:20:56 +00:00
HoneyryderChuck
900bffb61a added timeout to tests 2017-12-14 01:20:29 +00:00
HoneyryderChuck
703620bc19 added support for minitest run in parallel 2017-12-14 01:20:12 +00:00
HoneyryderChuck
51cdf95aad added helper assertion helpers 2017-12-14 01:19:47 +00:00
HoneyryderChuck
808c351d72 added support for expect 100-continue requests (Fixes #2) 2017-12-13 23:33:16 +00:00
HoneyryderChuck
368b207c50 http2: disable push on settings 2017-12-13 22:45:26 +00:00
HoneyryderChuck
059908c43a http2: better logging, prefix with stream id 2017-12-13 22:45:11 +00:00
HoneyryderChuck
71363d6794 more accurate method for calculating #empty? 2017-12-13 22:44:45 +00:00
HoneyryderChuck
d9830dab01 inspect if @io is expected (this can shadow real errors otherwise 2017-12-13 01:24:27 +00:00
HoneyryderChuck
157d7e1fed fixed 2017-12-13 01:24:04 +00:00
HoneyryderChuck
89298be707 allow debug option, which can be passed the logger (must respond to #<<); using it in the debug logger for http1 payload and http2 frames 2017-12-13 01:23:38 +00:00