Feature #6621

Accept a CGI parameter without a value

Added by Eric Hodel almost 3 years ago. Updated almost 3 years ago.

[ruby-core:45761]
Status:Closed
Priority:Normal
Assignee:Takeyuki FUJIOKA

Description

So "id" will be treaded like "id="

From https://github.com/ruby/ruby/pull/58

Patch by Michel Martens: https://github.com/ruby/ruby/pull/58.diff

Associated revisions

Revision 36304
Added by Takeyuki FUJIOKA almost 3 years ago

Wed Jul 4 08:45:41 2012 Takeyuki FUJIOKA xibbar@ruby-lang.org

  • lib/cgi/core.rb: fix bug: When query parameter is 'id=123&id', cgi['id'] => '123' is correct. First parameter is valid. [Feature #6621]

Revision 36304
Added by Takeyuki FUJIOKA almost 3 years ago

Wed Jul 4 08:45:41 2012 Takeyuki FUJIOKA xibbar@ruby-lang.org

  • lib/cgi/core.rb: fix bug: When query parameter is 'id=123&id', cgi['id'] => '123' is correct. First parameter is valid. [Feature #6621]

History

#1 Updated by Nobuyoshi Nakada almost 3 years ago

  • Status changed from Open to Feedback

Why do you need it?
Shouldn't it be an error?

#2 Updated by Takeyuki FUJIOKA almost 3 years ago

when query is 'id=123&id=', cgi["id"] is 123.
but query is 'id=123&id', cgi["id"] is "".

I will update with this patch.

#3 Updated by Takeyuki FUJIOKA almost 3 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36304.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Wed Jul 4 08:45:41 2012 Takeyuki FUJIOKA xibbar@ruby-lang.org

  • lib/cgi/core.rb: fix bug: When query parameter is 'id=123&id', cgi['id'] => '123' is correct. First parameter is valid. [Feature #6621]

Also available in: Atom PDF