architect-functions 0.5.2 → 0.5.3
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/architect/http.rb +10 -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: 90fc901dc181df1e27cbe945f8e45f90606d845a840ee17fd9259b93715ca183
|
|
4
|
+
data.tar.gz: da52f1a06eb67d04e7f98b9c4eacb2197ecf4038a5b35c9d2f5b13083b1fea7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56440f59753103367e133dd7e8ad823c525792a5f5a486000e85e8f2b67642083cf496ac797c412963ff9025af696872773eed71eebbfd4171f25c16f2c71129
|
|
7
|
+
data.tar.gz: 86c22be3b8a70b876ccec4ff7f88880ef0810ec594aece098977a08e85db62a760fa58daf1c047390508a5441ece4cc4062a79c819842f2da11580dba60c0803
|
data/lib/architect/http.rb
CHANGED
|
@@ -8,11 +8,18 @@ module Arc
|
|
|
8
8
|
|
|
9
9
|
def self.read(request)
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
|
|
11
|
+
# ruby is awesome; hash keys might be strings or symbols
|
|
12
|
+
tmp = if request[:event].has_key? :headers then
|
|
13
|
+
request[:event][:headers]
|
|
14
|
+
else
|
|
15
|
+
request[:event]['headers']
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# continue our cookie search
|
|
19
|
+
raw = tmp['cookie'] || tmp[:cookie] || false
|
|
13
20
|
return {} if raw == false
|
|
14
21
|
|
|
15
|
-
# if we found cookie parse it; bail if _idx is missing
|
|
22
|
+
# if we found the cookie parse it; bail if _idx is missing
|
|
16
23
|
parsed = raw.split(/=|;/).collect(&:strip)
|
|
17
24
|
return {} unless parsed.include? '_idx'
|
|
18
25
|
|