miniproxy 0.3.0 → 0.4.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/lib/miniproxy/proxy_server.rb +7 -2
- data/lib/miniproxy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1498d971ffe909b6a3fcaaaaec2cd7aebf1629ed7f3818d0e9475effd677fbe
|
4
|
+
data.tar.gz: b3e56000c850b03e70a85133a2c7b8832b3013ec2ef9d07ea5a72a1017418182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c3601e354b1fed1faa3dd789392fc78ee8d5777c78a71bc7ad80bf2db9f9a7131f0df0ebc95cd0e0a634a72ae8eeb2ef58a3afc917cfd6cc7b15576192b7426
|
7
|
+
data.tar.gz: 0b4c1333ce5e0d65289fa7786d270d7bf9903cde687a22fe4cd3c54e12a83e81a4c402ebe26140d99da85369e97b152b0262ca365040bdd2edbb288fa209055e
|
@@ -40,9 +40,14 @@ module MiniProxy
|
|
40
40
|
super(req, res)
|
41
41
|
else
|
42
42
|
if req.request_method == "CONNECT"
|
43
|
+
is_ssl = req.unparsed_uri.include?(":443")
|
44
|
+
|
43
45
|
# If something is trying to initiate an SSL connection, rewrite
|
44
|
-
# the URI to point to our fake server.
|
45
|
-
|
46
|
+
# the URI to point to our fake server so we can stub SSL requests.
|
47
|
+
if is_ssl
|
48
|
+
req.instance_variable_set(:@unparsed_uri, "localhost:#{self.config[:FakeServerPort]}")
|
49
|
+
end
|
50
|
+
|
46
51
|
super(req, res)
|
47
52
|
else
|
48
53
|
# Otherwise, call our handler to respond with an appropriate
|
data/lib/miniproxy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miniproxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Conversation Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.7.
|
91
|
+
rubygems_version: 2.7.7
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Easily stub external requests for your browser tests.
|