From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:69787] [Ruby trunk - Bug #11281] [Rejected] Unexpected behaviour in HTTP header processing
Date: Tue, 30 Jun 2015 03:16:07 +0000 [thread overview]
Message-ID: <redmine.journal-53168.20150630031606.4961bdb12994e4d2@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11281.20150618134940@ruby-lang.org
Issue #11281 has been updated by Nobuyoshi Nakada.
Status changed from Feedback to Rejected
Shishir Joshi wrote:
> So I am OK with skipping `nil` values.
Then no needs to allow `nil`?
----------------------------------------
Bug #11281: Unexpected behaviour in HTTP header processing
https://bugs.ruby-lang.org/issues/11281#change-53168
* Author: John Carter
* Status: Rejected
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Running this:
~~~ruby
Net::HTTP::Get.new('http://any.url', {'header' => nil})
~~~
Results in:
~~~
NoMethodError: undefined method `strip' for nil:NilClass
from /home/vagrant/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http/header.rb:17:in `block in initialize_http_header'
from /home/vagrant/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http/header.rb:15:in `each'
from /home/vagrant/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http/header.rb:15:in `initialize_http_header'
from /home/vagrant/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http/generic_request.rb:43:in `initialize'
from /home/vagrant/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/net/http/request.rb:14:in `initialize'
from (irb):13:in `new'
from (irb):13
~~~
Suggest implementation changes to assume a `nil` header value is the same as an empty string.
Thanks,
John
--
https://bugs.ruby-lang.org/
next prev parent reply other threads:[~2015-06-30 2:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-11281.20150618134940@ruby-lang.org>
2015-06-18 13:49 ` [ruby-core:69652] [Ruby trunk - Bug #11281] [Open] Unexpected behaviour in HTTP header processing jcarter
2015-06-28 11:45 ` [ruby-core:69761] [Ruby trunk - Bug #11281] [Feedback] " nobu
2015-06-29 16:34 ` [ruby-core:69773] [Ruby trunk - Bug #11281] " shishir127
2015-06-30 3:16 ` nobu [this message]
2015-07-01 12:27 ` [ruby-core:69828] " shishir127
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-53168.20150630031606.4961bdb12994e4d2@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).