rack-pathinfo-fix 0.0.1 → 0.0.2
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 +8 -8
- data/lib/rack_pathinfo_fix.rb +8 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTM5ZTJlOTk2OWRiOGMwZmNkZGMyZGM1NGViOTU3MDUwZDkxNjQ0Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2M3YTViOTY1NzcwM2M4OTBkOGVlMThlNjkwZDYwZGE0YmE3OGM4OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTg3ZWE3YmNhNjZlN2YyODBjZjMxY2ViNjU3ZjNhOTAwNzU5MmYyMTY0Y2Vl
|
10
|
+
YzZhM2VlZDA1YmZiNGRmNThkYTJkMmVjNjg5ZTg0NGQ0ZjQ1M2ZiMzgxNTNh
|
11
|
+
ZWI2Y2YwZTY2ODhlYTE1MTQ2YTI1NWEzNWU0YzY1ZWZkNzc5ZTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzcyYTkwZjk1NWI5Y2VjMDlmZWU1MDU1NjMxYWYxMDMwM2U1ODNkMDMxMzhm
|
14
|
+
YTZhNDBjNDY4ODlmNmJkNjFiZjUzNTk5MzJhMzJlZmQ5NWFlMGRkZTRkMWU0
|
15
|
+
ZjY3OTE2ZTVkYzlmMjNhYmRhMDYzNzhhNWQwN2JiOWEwYmU2NmY=
|
data/lib/rack_pathinfo_fix.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# Rack PathInfo Fix
|
2
|
-
#
|
1
|
+
# Rack PathInfo Fix
|
2
|
+
#
|
3
3
|
# This class is a Rack Middleware that fixes up
|
4
4
|
# PATH_INFO to be correct for Rack based apps.
|
5
5
|
class RackPathInfoFix
|
@@ -8,7 +8,12 @@ class RackPathInfoFix
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def call(env)
|
11
|
-
|
11
|
+
pi = env['PATH_INFO']
|
12
|
+
sn = env['SCRIPT_NAME']
|
13
|
+
|
14
|
+
if pi != sn
|
15
|
+
env['PATH_INFO'] = File.join(sn, pi)
|
16
|
+
end
|
12
17
|
|
13
18
|
@app.call env
|
14
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-pathinfo-fix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Randy Carnahan
|
@@ -10,7 +10,8 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Rack Middleware to fix PATH_INFO
|
13
|
+
description: Rack Middleware to fix Apache's PATH_INFO issues where SCRIPT_NAME is
|
14
|
+
stripped from it.
|
14
15
|
email: syntruth@gmail.com
|
15
16
|
executables: []
|
16
17
|
extensions: []
|
@@ -19,7 +20,7 @@ files:
|
|
19
20
|
- lib/rack_pathinfo_fix.rb
|
20
21
|
homepage:
|
21
22
|
licenses:
|
22
|
-
-
|
23
|
+
- GPL
|
23
24
|
metadata: {}
|
24
25
|
post_install_message:
|
25
26
|
rdoc_options: []
|