forward-proxy 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3018291ebebbfa87a02ba1409fa3f0c0af9b5d0ffb8917636dd4f8e397d8a4fb
4
- data.tar.gz: dd3420d19ee1ac89064d7fd965768072cc25ce100555a4dc59881530fc2b6d66
3
+ metadata.gz: f4251c1e0cac2b15b884b54ee293a1822ee955347f3c488b558c0f82cf50ddfe
4
+ data.tar.gz: 51a472149c1c0f04ad12edc90b0084760417e03b8d17889b27ee11ceb66ebc0d
5
5
  SHA512:
6
- metadata.gz: c1676662f33627745b09c2049957a4232885862bac77ba4f1ecb48b085683ef832825d2a0b15c725bdf6553456bb710c1b847f4027e55e8ed31c1c31aa1b307f
7
- data.tar.gz: '08652da6a675acfb0c371d571bad140d3a50673d76d2aae74ea6a33f2b4f1e21b07f3378fcaaf74099d6fe93de29cc923108c1d278a9364b885b80a405951643'
6
+ metadata.gz: f930317afad701fd29d5db2a720ce8d1ed7d9039116baa81c667f873ba709d252fe2c2286920258d522597279f9997c8fd284100640f966e14599f3d7b2df563
7
+ data.tar.gz: c5ca8e7c0c5238c5a0d09d9fc17a8eb920b014598e42a5aace0780663e19d52a8c850eab28be1cf8fa2a2449521a425d0b3b33e5546e7d6db1a14ea9610721ac
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.8.0
4
+
5
+ - add http head support.
6
+ - improve timeout testing.
7
+
8
+ ## 0.7.0
9
+
10
+ - bugfix default threads from `4` to `128`.
11
+
3
12
  ## 0.6.0
4
13
 
5
14
  - add connection timeout to stop tracking connection from saturating client threads.
@@ -37,7 +37,7 @@ module ForwardProxy
37
37
 
38
38
  case req.request_method
39
39
  when METHOD_CONNECT then handle_tunnel(client_conn, req)
40
- when METHOD_GET, METHOD_POST then handle(client_conn, req)
40
+ when METHOD_GET, METHOD_HEAD, METHOD_POST then handle(client_conn, req)
41
41
  else
42
42
  raise Errors::HTTPMethodNotImplemented
43
43
  end
@@ -69,6 +69,7 @@ module ForwardProxy
69
69
 
70
70
  METHOD_CONNECT = "CONNECT"
71
71
  METHOD_GET = "GET"
72
+ METHOD_HEAD = "HEAD"
72
73
  METHOD_POST = "POST"
73
74
 
74
75
  # The following comments are from the IETF document
@@ -173,6 +174,7 @@ module ForwardProxy
173
174
  def handle_error(client_conn, err)
174
175
  status_code = case err
175
176
  when Errors::ConnectionTimeoutError then 504
177
+ when Errors::HTTPMethodNotImplemented then 501
176
178
  else
177
179
  502
178
180
  end
@@ -196,6 +198,7 @@ module ForwardProxy
196
198
 
197
199
  klass = case req.request_method
198
200
  when METHOD_GET then Net::HTTP::Get
201
+ when METHOD_HEAD then Net::HTTP::Head
199
202
  when METHOD_POST then Net::HTTP::Post
200
203
  else
201
204
  raise Errors::HTTPMethodNotImplemented
@@ -1,3 +1,3 @@
1
1
  module ForwardProxy
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forward-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Moriarty
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-23 00:00:00.000000000 Z
11
+ date: 2021-07-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Forward proxy using just Ruby standard libraries.
14
14
  email: