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 +4 -4
- data/LICENSE +1 -1
- data/LICENSE.sabre +1 -1
- data/lib/tilia/http/message.rb +5 -0
- data/lib/tilia/http/sapi.rb +4 -1
- data/lib/tilia/http/version.rb +1 -1
- data/test/http/request_test.rb +5 -5
- data/test/http/sapi_test.rb +4 -4
- 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: 7c8c56c6bee2fbc781c5933a3470db88f0873714
|
4
|
+
data.tar.gz: ff04cd63c1190ee6d4b2ba3eb34a60c0c6bcdea0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 744dcd861bb041733138f0867c0ac8a32045b91bd03a00d36879c70e837bf3ca36db73347e81ec8995d91b029626f551f90f5098b41ceb45b6ed7c4740d4bfec
|
7
|
+
data.tar.gz: c71b78b5639d35f605f453aa35c26b4d7c255f80f7efa9822189b31a17f0ec6504ef3fa51f08811b3b38585e8015560297e87bcca1f04a812abd43a32f196b9f
|
data/LICENSE
CHANGED
data/LICENSE.sabre
CHANGED
data/lib/tilia/http/message.rb
CHANGED
data/lib/tilia/http/sapi.rb
CHANGED
@@ -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 '
|
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
|
data/lib/tilia/http/version.rb
CHANGED
data/test/http/request_test.rb
CHANGED
@@ -37,8 +37,8 @@ module Tilia
|
|
37
37
|
|
38
38
|
def test_get_absolute_url
|
39
39
|
s = {
|
40
|
-
'HTTP_HOST'
|
41
|
-
'
|
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'
|
50
|
-
'
|
51
|
-
'HTTPS'
|
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)
|
data/test/http/sapi_test.rb
CHANGED
@@ -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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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.
|
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:
|
11
|
+
date: 2016-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|