<?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>188586</bug_id>
          
          <creation_ts>2018-08-14 16:07:08 -0700</creation_ts>
          <short_desc>[Cocoa] HEAD request should behave as same as GET request for Content-Length header.</short_desc>
          <delta_ts>2020-05-18 00:02:18 -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>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Basuke Suzuki">basuke</reporter>
          <assigned_to name="Basuke Suzuki">basuke</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>basuke</cc>
    
    <cc>rbuis</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1450143</commentid>
    <comment_count>0</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2018-08-14 16:07:08 -0700</bug_when>
    <thetext>In the http/tests/xmlhttprequest/methods.html test, 

GET request doesn&apos;t send Content-Length field. The test log of &apos;GET(null bytes)&apos; indicates no Content-Length header is sent.

&gt; GET(&quot;&quot;): GET(null bytes), Content-Type: null
&gt; GET(null): GET(null bytes), Content-Type: null
&gt; GET(&quot;123&quot;): GET(null bytes), Content-Type: null

But http/tests/xmlhttprequest/methods-expected.txt, HEAD seems sending Content-Length header with value of 0.

&gt; HEAD(&quot;&quot;): HEAD(0 bytes), Content-Type: null
&gt; HEAD(null): HEAD(0 bytes), Content-Type: null
&gt; HEAD(&quot;123&quot;): HEAD(0 bytes), Content-Type: null

As specification defined, HEAD should be as close identical as GET request.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD
&quot;The HTTP HEAD method requests the headers that are returned if the specified resource would be requested with an HTTP GET method&quot;

Soup and Curl returns (null bytes) which is same with GET requests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1653495</commentid>
    <comment_count>1</comment_count>
    <who name="Rob Buis">rbuis</who>
    <bug_when>2020-05-17 23:36:58 -0700</bug_when>
    <thetext>It would be nice to have HEAD behave as GET here, in order to pass more WPT tests and align with other platforms (like gtk). However this seems like CFNetwork behavior and maybe not necessarily a WebKit bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1653501</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-05-18 00:02:08 -0700</bug_when>
    <thetext>&lt;rdar://problem/56144949&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>