From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 2D20017C2613 for ; Fri, 14 Sep 2012 10:26:45 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 4935BEA6F81 for ; Fri, 14 Sep 2012 10:30:22 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id A283D8FC22 for ; Fri, 14 Sep 2012 10:30:22 +0900 (JST) X-Virus-Scanned: amavisd-new at funfun.nagaokaut.ac.jp Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by localhost (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EN8n9TNhQzPM for ; Fri, 14 Sep 2012 10:30:22 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 81DC88FC21 for ; Fri, 14 Sep 2012 10:30:22 +0900 (JST) Received: from carbon.ruby-lang.org (carbon.ruby-lang.org [221.186.184.68]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id F2150952446 for ; Fri, 14 Sep 2012 10:30:20 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by carbon.ruby-lang.org (Postfix) with ESMTP id 1A1EB3C21EB9A; Fri, 14 Sep 2012 10:30:19 +0900 (JST) Received: from fluorine.ruby-lang.org (www.rubyist.net [210.251.121.216]) by carbon.ruby-lang.org (Postfix) with ESMTP id 80A213C21E7A6 for ; Fri, 14 Sep 2012 10:30:18 +0900 (JST) Received: from ruby-lang.org (localhost [127.0.0.1]) by fluorine.ruby-lang.org (Postfix) with ESMTP id 1F4763EE1F for ; Fri, 14 Sep 2012 10:30:17 +0900 (JST) Delivered-To: ruby-core@ruby-lang.org Date: Fri, 14 Sep 2012 10:30:18 +0900 Posted: Fri, 14 Sep 2012 10:30:16 +0900 From: "boris317 (shawn adams)" Reply-To: ruby-core@ruby-lang.org Subject: [ruby-core:47522] [ruby-trunk - Bug #7021] WEBrick::HTTPUtils.parse_header "normalizing" white space of cookie values. To: ruby-core@ruby-lang.org Message-Id: References: X-ML-Name: ruby-core X-Mail-Count: 47522 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-core-ctl@ruby-lang.org; help= X-Mailer: Redmine X-Redmine-Issue-Author: boris317 X-Auto-Response-Suppress: OOF X-Redmine-Issue-Id: 7021 X-Redmine-Mailinglistintegration-Message-Ids: 18077 X-Redmine-Project: ruby-trunk Auto-Submitted: auto-generated X-Redmine-Site: Ruby Issue Tracking System X-Redmine-Host: bugs.ruby-lang.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Precedence: bulk List-Id: ruby-core.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: 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? -- http://bugs.ruby-lang.org/