icaprb-server 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: c29df2175284d6033e5651bfa7cd4c31b4b22a8b
4
- data.tar.gz: eb49631c989580e438dbe18a8f8b64e2f2e5121c
3
+ metadata.gz: 310a9a56affd5154b58cf443752425c26f9b2806
4
+ data.tar.gz: 44344589b5dbf087aa8e2b671fcfe2c0888a337a
5
5
  SHA512:
6
- metadata.gz: c9172a8ea5df5842fab74ed6d2b21ad1b72380882d36b8d1602ca0ec50655c576b89fad64ba6fe061dcfc7554a13c23c43e9d0f5a0fb769f18c63f0d563ce5f1
7
- data.tar.gz: 6d8f06a8a04715fe4f3469ae060fe9975694119c5c5914b328b39bb7e3cdc731ab35238c2d0486ef9dee6e83a85ea78e1326aa8417f208c73c913772ce880f93
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
- uri = URI(str_uri)
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
@@ -1,6 +1,6 @@
1
1
  module ICAPrb
2
2
  module Server
3
3
  # current version number of this library
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
6
6
  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.1
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-16 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler