Forum: Ruby-core [ruby-trunk - Bug #7021][Open] WEBrick::HTTPUtils.parse_header "normalizing" white space of cookie v

Posted by boris317 (shawn adams) (Guest)
on 2012-09-14 03:16
(Received via mailing list)
Issue #7021 has been reported by boris317 (shawn adams).

----------------------------------------
Bug #7021: WEBrick::HTTPUtils.parse_header "normalizing" white space of 
cookie values.
https://bugs.ruby-lang.org/issues/7021

Author: boris317 (shawn adams)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


parse_header calls value.gsub!(/\s+/, " ") on ALL header values. I am 
using a web framework that runs on WEBrick as an HTTP proxy. When the 
cookies pass through the proxy the whitespace is normalized which is 
actually breaking the outgoing service call.  There is a length "flag" 
in the cookie and stripping any whitespace from it breaks that.  Is it 
intended behavior to normalize whitespace in request cookie values?
Posted by boris317 (shawn adams) (Guest)
on 2012-09-14 03:30
(Received via mailing list)
Issue #7021 has been updated by boris317 (shawn adams).


I forgot to add this in the description here is the style of cookie that 
is giving me issues:

Cookie: testcookie=`FOO  BAR`8;

There are two spaces between and FOO and BAR and its important that they 
stay that way.
----------------------------------------
Bug #7021: WEBrick::HTTPUtils.parse_header "normalizing" white space of 
cookie values.
https://bugs.ruby-lang.org/issues/7021#change-29295

Author: boris317 (shawn adams)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


parse_header calls value.gsub!(/\s+/, " ") on ALL header values. I am 
using a web framework that runs on WEBrick as an HTTP proxy. When the 
cookies pass through the proxy the whitespace is normalized which is 
actually breaking the outgoing service call.  There is a length "flag" 
in the cookie and stripping any whitespace from it breaks that.  Is it 
intended behavior to normalize whitespace in request cookie values?
Posted by zzak (Zachary Scott) (Guest)
on 2012-09-14 15:06
(Received via mailing list)
Issue #7021 has been updated by zzak (Zachary Scott).

Category set to lib
Assignee set to nahi (Hiroshi Nakamura)


----------------------------------------
Bug #7021: WEBrick::HTTPUtils.parse_header "normalizing" white space of 
cookie values.
https://bugs.ruby-lang.org/issues/7021#change-29306

Author: boris317 (shawn adams)
Status: Open
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: lib
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


parse_header calls value.gsub!(/\s+/, " ") on ALL header values. I am 
using a web framework that runs on WEBrick as an HTTP proxy. When the 
cookies pass through the proxy the whitespace is normalized which is 
actually breaking the outgoing service call.  There is a length "flag" 
in the cookie and stripping any whitespace from it breaks that.  Is it 
intended behavior to normalize whitespace in request cookie values?
Posted by usa (Usaku NAKAMURA) (Guest)
on 2012-12-21 14:22
(Received via mailing list)
Issue #7021 has been updated by usa (Usaku NAKAMURA).

Status changed from Open to Assigned


----------------------------------------
Bug #7021: WEBrick::HTTPUtils.parse_header "normalizing" white space of 
cookie values.
https://bugs.ruby-lang.org/issues/7021#change-34950

Author: boris317 (shawn adams)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: lib
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


parse_header calls value.gsub!(/\s+/, " ") on ALL header values. I am 
using a web framework that runs on WEBrick as an HTTP proxy. When the 
cookies pass through the proxy the whitespace is normalized which is 
actually breaking the outgoing service call.  There is a length "flag" 
in the cookie and stripping any whitespace from it breaks that.  Is it 
intended behavior to normalize whitespace in request cookie values?
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.