<?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>179422</bug_id>
          
          <creation_ts>2017-11-08 03:15:19 -0800</creation_ts>
          <short_desc>[Fetch API] Missing authentication header for POST requests</short_desc>
          <delta_ts>2017-11-08 08:44:25 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit API</component>
          <version>Safari 11</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Matheson">Chris</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1369385</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Matheson">Chris</who>
    <bug_when>2017-11-08 03:15:19 -0800</bug_when>
    <thetext>Safari:  11.0.1
OS Version: OS X 10.12.6
URLs (if applicable) :
Other browsers tested:
  Chrome Version 61.0.3163.100: FAIL
  Firefox 56.0b3 (64-bit): OK

What steps will reproduce the problem?
1. use HTTP basic auth with browser handled authentication (www-authenticate)
2. make a POST request to the same origin (https) with credentials: &apos;include&apos; or credentials: &apos;same-origin&apos;
E.G. fetch(&quot;/some-path&quot;, {headers: {&quot;Content-Type&quot;: &quot;application/json&quot;, Accept: &quot;application/json&quot;}, credentials: &quot;same-origin&quot;, method: &quot;POST&quot;, body: &quot;{}&quot;})
3. inspect request for presence of Authorisation header

What is the expected result?

Expect the browser to add the Header to the outgoing request

What happens instead of that?

Header is not present


Please provide any additional information below. Attach a screenshot if
possible.

I initially raised this against the spec as i wasn&apos;t sure if it was specified behaviour or not. https://github.com/whatwg/fetch/issues/628#issuecomment-342555664

However I&apos;ve been advised that this is a bug in the browser and it *should* have added the header



Also filed against chrome at: https://bugs.chromium.org/p/chromium/issues/detail?id=782621</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>