https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112015-06-28T11:45:31ZRuby Issue Tracking SystemRuby master - Bug #11281: Unexpected behaviour in HTTP header processinghttps://redmine.ruby-lang.org/issues/11281?journal_id=531382015-06-28T11:45:31Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/53138/diff?detail_id=38262">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>Why do you need to give a <code>nil</code>?</p> Ruby master - Bug #11281: Unexpected behaviour in HTTP header processinghttps://redmine.ruby-lang.org/issues/11281?journal_id=531512015-06-29T16:34:48Zshishir127 (Shishir Joshi)shishir127@gmail.com
<ul></ul><p>I think if the user wants to send a blank header, then the user should do that explicitly like</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="o">::</span><span class="no">Get</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="s1">'http://any.url'</span><span class="p">,</span> <span class="p">{</span><span class="s1">'header'</span> <span class="o">=></span> <span class="s2">""</span><span class="p">})</span>
</code></pre>
<p>Converting a <code>nil</code> value to a blank string is not so obvious behaviour as there is an implicit conversion involved. So I am OK with skipping <code>nil</code> values.</p> Ruby master - Bug #11281: Unexpected behaviour in HTTP header processinghttps://redmine.ruby-lang.org/issues/11281?journal_id=531682015-06-30T03:16:06Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Rejected</i></li></ul><p>Shishir Joshi wrote:</p>
<blockquote>
<p>So I am OK with skipping <code>nil</code> values.</p>
</blockquote>
<p>Then no needs to allow <code>nil</code>?</p> Ruby master - Bug #11281: Unexpected behaviour in HTTP header processinghttps://redmine.ruby-lang.org/issues/11281?journal_id=532262015-07-01T12:27:08Zshishir127 (Shishir Joshi)shishir127@gmail.com
<ul></ul><p>Nobuyoshi Nakada wrote:</p>
<blockquote>
<p>Shishir Joshi wrote:</p>
<blockquote>
<p>So I am OK with skipping <code>nil</code> values.</p>
</blockquote>
<p>Then no needs to allow <code>nil</code>?</p>
</blockquote>
<p>Yes. Nil header doesn't make sense and should be skipped. But I'm not really convinced that this is a good case to raise an exception. Your thoughts?</p>