forward-proxy 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/forward_proxy/server.rb +4 -1
- data/lib/forward_proxy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4251c1e0cac2b15b884b54ee293a1822ee955347f3c488b558c0f82cf50ddfe
|
4
|
+
data.tar.gz: 51a472149c1c0f04ad12edc90b0084760417e03b8d17889b27ee11ceb66ebc0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f930317afad701fd29d5db2a720ce8d1ed7d9039116baa81c667f873ba709d252fe2c2286920258d522597279f9997c8fd284100640f966e14599f3d7b2df563
|
7
|
+
data.tar.gz: c5ca8e7c0c5238c5a0d09d9fc17a8eb920b014598e42a5aace0780663e19d52a8c850eab28be1cf8fa2a2449521a425d0b3b33e5546e7d6db1a14ea9610721ac
|
data/CHANGELOG.md
CHANGED
data/lib/forward_proxy/server.rb
CHANGED
@@ -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
|
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.
|
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-
|
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:
|