Project

General

Profile

Actions

Bug #2124

closed

CGI module Set-Cookie header parsing

Added by mmb (Matthew Boedicker) over 14 years ago. Updated almost 13 years ago.

Status:
Rejected
Assignee:
-
ruby -v:
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
[ruby-core:25656]

Description

=begin
Having a couple issues with parsing Set-Cookie headers.

CGI::Cookie::parse('k=v; expires=Mon, 19-Sep-2011 20:03:01 GMT; path=/; domain=.test.com')

{"k"=>["v"], "expires"=>["Mon"], "domain"=>[".test.com"], "path"=>["/"]}

  1. Date is not parsed correctly

  2. How do I get the name of this cookie? Check for any keys that are not "expires", "domain" or "path"?

  3. Documentation is not correct. Says it will return hash of cookie_name => Cookie
    =end


Files

cgi_cookie_parse.patch (1.78 KB) cgi_cookie_parse.patch patch for parsing Set-Cookie headers mmb (Matthew Boedicker), 09/20/2009 07:26 AM
Actions #1

Updated by mmb (Matthew Boedicker) over 14 years ago

=begin
Attached patch of how I think it should behave.
=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Rejected

=begin
Parsing Set-Cookie: is not the business of CGI::Cookie.parse.
cgi.rb is for server side only.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0