<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>157157</bug_id>
          
          <creation_ts>2016-04-28 17:04:46 -0700</creation_ts>
          <short_desc>Allow non-standard HTTP headers in WebSocket handshake</short_desc>
          <delta_ts>2016-04-29 10:15:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>155602</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Wilander">wilander</reporter>
          <assigned_to name="John Wilander">wilander</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1188446</commentid>
    <comment_count>0</comment_count>
    <who name="John Wilander">wilander</who>
    <bug_when>2016-04-28 17:04:46 -0700</bug_when>
    <thetext>Several reports of regressions in the wild mean we have to relax our header policy in the WebSocket handshake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188450</commentid>
    <comment_count>1</comment_count>
      <attachid>277666</attachid>
    <who name="John Wilander">wilander</who>
    <bug_when>2016-04-28 17:12:25 -0700</bug_when>
    <thetext>Created attachment 277666
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188452</commentid>
    <comment_count>2</comment_count>
      <attachid>277666</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-04-28 17:15:23 -0700</bug_when>
    <thetext>Comment on attachment 277666
Patch

r=me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188475</commentid>
    <comment_count>3</comment_count>
      <attachid>277666</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-04-28 18:07:09 -0700</bug_when>
    <thetext>Comment on attachment 277666
Patch

Clearing flags on attachment: 277666

Committed r200219: &lt;http://trac.webkit.org/changeset/200219&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188476</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-04-28 18:07:13 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188484</commentid>
    <comment_count>5</comment_count>
      <attachid>277666</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-04-28 19:44:07 -0700</bug_when>
    <thetext>Comment on attachment 277666
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277666&amp;action=review

&gt; Source/WebCore/ChangeLog:9
&gt; +        No new tests since https://bugs.webkit.org/show_bug.cgi?id=157095
&gt; +        tests that non-standard headers are allowed.

Was there a concrete motivation for further behavior change? If that&apos;s the case, then we should have a test that verifies that the specific new case keeps working.

Even if not, every behavior change should have a test, so adding a test for e.g. &quot;Foo: bar&quot; would be appropriate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188493</commentid>
    <comment_count>6</comment_count>
      <attachid>277666</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-04-28 20:25:59 -0700</bug_when>
    <thetext>Comment on attachment 277666
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277666&amp;action=review

&gt;&gt; Source/WebCore/ChangeLog:9
&gt;&gt; +        tests that non-standard headers are allowed.
&gt; 
&gt; Was there a concrete motivation for further behavior change? If that&apos;s the case, then we should have a test that verifies that the specific new case keeps working.
&gt; 
&gt; Even if not, every behavior change should have a test, so adding a test for e.g. &quot;Foo: bar&quot; would be appropriate.

He already created tests for the issues we knew about (Sec-WebSocket-Location, WebSocket-location, etc.), but we have since found more instances of &quot;custom&quot; headers being used by developers.

I think it&apos;s fine to remove the tighter control on the headers, but retain the new &quot;non-standard&quot; tests that he added as a check that we don&apos;t start blocking them again.

I don&apos;t think further tests are warranted for this specific change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1188677</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-04-29 10:15:21 -0700</bug_when>
    <thetext>If our reading of the spec is that any headers are allowed, it&apos;s still somewhat valuable to test for headers that have never been called out in any version of the spec.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>277666</attachid>
            <date>2016-04-28 17:12:25 -0700</date>
            <delta_ts>2016-04-28 18:07:09 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-157157-20160428171256.patch</filename>
            <type>text/plain</type>
            <size>2457</size>
            <attacher name="John Wilander">wilander</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIwMDIxNikKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIwIEBACisyMDE2LTA0LTI4ICBKb2huIFdp
bGFuZGVyICA8d2lsYW5kZXJAYXBwbGUuY29tPgorCisgICAgICAgIEFsbG93IG5v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jNzIzMCNzZWN0aW9uLTMuMi40CkluZGV4OiBTb3Vy
Y2UvV2ViQ29yZS9wbGF0Zm9ybS9uZXR3b3JrL0hUVFBIZWFkZXJOYW1lcy5pbgo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
Ci0tLSBTb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9uZXR3b3JrL0hUVFBIZWFkZXJOYW1lcy5pbgko
cmV2aXNpb24gMjAwMjExKQorKysgU291cmNlL1dlYkNvcmUvcGxhdGZvcm0vbmV0d29yay9IVFRQ
SGVhZGVyTmFtZXMuaW4JKHdvcmtpbmcgY29weSkKQEAgLTEwOCwxMCArMTA4LDMgQEAgSWN5LU1l
dGFkYXRhCiBJY3ktTmFtZQogSWN5LVRpdGxlCiBJY3ktVVJMCi0KLS8vIFRoZXNlIGFyZSBzcGVj
aWZpYyB0byBsZWdhY3kgV2ViU29ja2V0cyBpbXBsZW1lbnRhdGlvbnMKLS8vIGh0dHBzOi8vYnVn
cy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNTcwNTcKLVNlYy1XZWJTb2NrZXQtTG9jYXRp
b24KLVNlYy1XZWJTb2NrZXQtT3JpZ2luCi1XZWJTb2NrZXQtTG9jYXRpb24KLVdlYlNvY2tldC1P
cmlnaW4K
</data>

          </attachment>
      

    </bug>

</bugzilla>