rack-webfinger 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/webfinger/version.rb +1 -1
- data/lib/rack/webfinger.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '036498b473fc790b017df9b69a3cdc43c5e08c61838ba6619c7bf4ee139d0beb'
|
4
|
+
data.tar.gz: 845a20600df782a4884a3f50a9f2aa656c6b657dd2dc5284ec7998866958443a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d932c273321dd78cfa1b53336dcc10d9701631e98b7c014d0f769eb83ef996adefb4f19c934eabcb5987bb843270f951b08ac1e823de23d94e4966fe67b1568
|
7
|
+
data.tar.gz: 787165175c9d33bcf1f866f7fb8d80cda70e5c94ae696244d9bd8a4bcdd95098a68d03707c16378395b96ca9aad79e3f3f29a1e64f6fb1af3d1573ae7d3a7816
|
data/lib/rack/webfinger.rb
CHANGED
@@ -10,7 +10,7 @@ module Rack
|
|
10
10
|
@data_provider = data_provider
|
11
11
|
end
|
12
12
|
|
13
|
-
def not_found = [404, { '
|
13
|
+
def not_found = [404, { 'content-type' => 'text/plain' }, ['Resource not found']]
|
14
14
|
|
15
15
|
def call(env)
|
16
16
|
request = Rack::Request.new(env)
|
@@ -20,7 +20,7 @@ module Rack
|
|
20
20
|
resource = request.params['resource']
|
21
21
|
|
22
22
|
if !resource
|
23
|
-
return [400, { '
|
23
|
+
return [400, { 'content-type' => 'text/plain' }, ['Missing resource parameter']]
|
24
24
|
end
|
25
25
|
|
26
26
|
# We need this because Rack's handling of the query string by default overwrites
|
@@ -41,7 +41,7 @@ module Rack
|
|
41
41
|
filtered_data = filter_by_rel(response_data, rel_params)
|
42
42
|
|
43
43
|
[200,
|
44
|
-
{ '
|
44
|
+
{ 'content-type' => 'application/jrd+json' },
|
45
45
|
[JSON.generate(filtered_data)]
|
46
46
|
]
|
47
47
|
end
|