summaryrefslogtreecommitdiff
path: root/lib/cgi/session.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/session.rb')
-rw-r--r--lib/cgi/session.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 48f3496..30fc858 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -54,7 +54,9 @@ class CGI
@output_cookies = [
Cookie::new("name" => session_key,
"value" => id,
- "path" => if ENV["SCRIPT_NAME"] then
+ "path" => if ENV["PATH_INFO"] then
+ File::dirname(ENV["PATH_INFO"])
+ elsif ENV["SCRIPT_NAME"] then
File::dirname(ENV["SCRIPT_NAME"])
else
""