icaprb-server 0.0.1 → 0.0.2
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/icaprb/server/request_parser.rb +7 -1
- data/lib/icaprb/server/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 310a9a56affd5154b58cf443752425c26f9b2806
|
|
4
|
+
data.tar.gz: 44344589b5dbf087aa8e2b671fcfe2c0888a337a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15e5e27fd4d99d38f5cec13cfc24b5e823d404eaa4ce41e77e71e46bfa9a9ae47b7b00acf9d4b8a062330e22adb753c74a20363d572eb41c6e4d036073ed200e
|
|
7
|
+
data.tar.gz: cbf51ac63e838495b65dee9fcf57c4e3ddad0d1835754290542bcf8cc76b048f35f31699a42997ffe3b9f4d1f31ee41a542b265ba0b24d764d065a053ca09a15
|
|
@@ -135,7 +135,13 @@ module ICAPrb
|
|
|
135
135
|
@length_read += line.length
|
|
136
136
|
str_method, str_uri, str_version = line.scan(/(GET|POST|PUT|DELETE|PATCH|OPTIONS|TRACE|HEAD|CONNECT) (\S+) HTTP\/([\d\.]+)/i).first
|
|
137
137
|
raise HTTP_Parse_Error.new 'invalid http Method' if str_method.nil?
|
|
138
|
-
|
|
138
|
+
unless str_method == 'CONNECT'
|
|
139
|
+
uri = URI(str_uri)
|
|
140
|
+
else
|
|
141
|
+
host,port = str_uri.split(':')
|
|
142
|
+
uri = URI::Generic.new(nil,nil,host,port,nil,nil,"#{host}:#{port}",nil,nil).to_s
|
|
143
|
+
end
|
|
144
|
+
|
|
139
145
|
unless str_method && uri && str_version
|
|
140
146
|
raise HTTP_Parse_Error.new 'The request line is not complete.'
|
|
141
147
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: icaprb-server
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fabian Franz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-06-
|
|
11
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|