tilia-http 4.1.0.1 → 4.1.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: 71c49e895dd3c6f7755c25de1db8784743ab7a41
4
- data.tar.gz: dd2c6b472e38c5c5ce0a1e36ac36a5c63f3a4b63
3
+ metadata.gz: 7c8c56c6bee2fbc781c5933a3470db88f0873714
4
+ data.tar.gz: ff04cd63c1190ee6d4b2ba3eb34a60c0c6bcdea0
5
5
  SHA512:
6
- metadata.gz: d0c87eda3d0a5728716ecdc33df97c345dd011d1eced8ea7c2529e50d8f1979ce2551f9f6118e06dd8f1556a3a3a1cd3553be5ee0fca6ae5e041e79050a274e7
7
- data.tar.gz: e4cb8f1edd2b821a0f225652ca3862fb5ede08e60c637d611732861be0153f1dde11cda89112f69b70d88b5df62c0aba68ddf817b12de8c733f649a18b29dcf7
6
+ metadata.gz: 744dcd861bb041733138f0867c0ac8a32045b91bd03a00d36879c70e837bf3ca36db73347e81ec8995d91b029626f551f90f5098b41ceb45b6ed7c4740d4bfec
7
+ data.tar.gz: c71b78b5639d35f605f453aa35c26b4d7c255f80f7efa9822189b31a17f0ec6504ef3fa51f08811b3b38585e8015560297e87bcca1f04a812abd43a32f196b9f
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2015 Jakob Sack (tilia@jakobsack.de)
1
+ Copyright (C) 2015-2016 Jakob Sack (tilia@jakobsack.de)
2
2
 
3
3
  All rights reserved.
4
4
 
data/LICENSE.sabre CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/)
1
+ Copyright (C) 2009-2016 fruux GmbH (https://fruux.com/)
2
2
 
3
3
  All rights reserved.
4
4
 
@@ -236,6 +236,11 @@ module Tilia
236
236
  @headers = {}
237
237
  @http_version = '1.1'
238
238
  end
239
+
240
+ # TODO: document
241
+ def initialize_copy(_original)
242
+ @headers = @headers.deep_dup
243
+ end
239
244
  end
240
245
  end
241
246
  end
@@ -79,7 +79,7 @@ module Tilia
79
79
  http_version = '1.0' if value == 'HTTP/1.0'
80
80
  when 'REQUEST_METHOD'
81
81
  method = value
82
- when 'REQUEST_URI'
82
+ when 'REQUEST_PATH'
83
83
  url = value
84
84
 
85
85
  # These sometimes should up without a HTTP_ prefix
@@ -130,6 +130,9 @@ module Tilia
130
130
  end
131
131
  end
132
132
 
133
+ # RUBY: fake php ...
134
+ url = "#{url}?#{server_array['QUERY_STRING']}" if url && !server_array['QUERY_STRING'].blank?
135
+
133
136
  r = Tilia::Http::Request.new(method, url, headers)
134
137
  r.http_version = http_version
135
138
  r.raw_server_data = server_array
@@ -3,7 +3,7 @@ module Tilia
3
3
  # This class contains the version number for the HTTP package
4
4
  class Version
5
5
  # Full version number
6
- VERSION = '4.1.0.1'
6
+ VERSION = '4.1.0.2'
7
7
  end
8
8
  end
9
9
  end
@@ -37,8 +37,8 @@ module Tilia
37
37
 
38
38
  def test_get_absolute_url
39
39
  s = {
40
- 'HTTP_HOST' => 'sabredav.org',
41
- 'REQUEST_URI' => '/foo'
40
+ 'HTTP_HOST' => 'sabredav.org',
41
+ 'REQUEST_PATH' => '/foo'
42
42
  }
43
43
 
44
44
  r = Sapi.create_from_server_array(s)
@@ -46,9 +46,9 @@ module Tilia
46
46
  assert_equal('http://sabredav.org/foo', r.absolute_url)
47
47
 
48
48
  s = {
49
- 'HTTP_HOST' => 'sabredav.org',
50
- 'REQUEST_URI' => '/foo',
51
- 'HTTPS' => 'on'
49
+ 'HTTP_HOST' => 'sabredav.org',
50
+ 'REQUEST_PATH' => '/foo',
51
+ 'HTTPS' => 'on'
52
52
  }
53
53
 
54
54
  r = Sapi.create_from_server_array(s)
@@ -8,7 +8,7 @@ module Tilia
8
8
  class SapiTest < Minitest::Test
9
9
  def test_construct_from_server_array
10
10
  request = Sapi.create_from_server_array(
11
- 'REQUEST_URI' => '/foo',
11
+ 'REQUEST_PATH' => '/foo',
12
12
  'REQUEST_METHOD' => 'GET',
13
13
  'HTTP_USER_AGENT' => 'Evert',
14
14
  'CONTENT_TYPE' => 'text/xml',
@@ -35,7 +35,7 @@ module Tilia
35
35
 
36
36
  def test_construct_php_auth
37
37
  request = Sapi.create_from_server_array(
38
- 'REQUEST_URI' => '/foo',
38
+ 'REQUEST_PATH' => '/foo',
39
39
  'REQUEST_METHOD' => 'GET',
40
40
  'PHP_AUTH_USER' => 'user',
41
41
  'PHP_AUTH_PW' => 'pass'
@@ -53,7 +53,7 @@ module Tilia
53
53
 
54
54
  def test_construct_php_auth_digest
55
55
  request = Sapi.create_from_server_array(
56
- 'REQUEST_URI' => '/foo',
56
+ 'REQUEST_PATH' => '/foo',
57
57
  'REQUEST_METHOD' => 'GET',
58
58
  'PHP_AUTH_DIGEST' => 'blabla'
59
59
  )
@@ -70,7 +70,7 @@ module Tilia
70
70
 
71
71
  def test_construct_redirect_auth
72
72
  request = Sapi.create_from_server_array(
73
- 'REQUEST_URI' => '/foo',
73
+ 'REQUEST_PATH' => '/foo',
74
74
  'REQUEST_METHOD' => 'GET',
75
75
  'REDIRECT_HTTP_AUTHORIZATION' => 'Basic bla'
76
76
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tilia-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0.1
4
+ version: 4.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Sack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-27 00:00:00.000000000 Z
11
+ date: 2016-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport