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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27846</bug_id>
          
          <creation_ts>2015-01-16 19:10:37 +0000</creation_ts>
          <short_desc>Disallow request body when method is HEAD/GET</short_desc>
          <delta_ts>2015-01-17 09:24:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Fetch</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikhil">nsm.nikhil</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+fetchspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117283</commentid>
    <comment_count>0</comment_count>
    <who name="Nikhil">nsm.nikhil</who>
    <bug_when>2015-01-16 19:10:37 +0000</bug_when>
    <thetext>XHR explicitly prohibits it. Fetch should do so too [1]

[1] http://logs.glob.uno/?c=content#c259373</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117285</commentid>
    <comment_count>1</comment_count>
    <who name="Nikhil">nsm.nikhil</who>
    <bug_when>2015-01-16 21:19:10 +0000</bug_when>
    <thetext>On further discussion [1], the Request constructor should throw an exception if such an attempt is made. For now Gecko is going to implement [2] something like:



If init&apos;s body member is present, run these substeps:

    **If request&apos;s normalized method is GET or HEAD, throw a TypeError.**

    Let stream and Content-Type be the result of extracting init&apos;s body member.

    Set r&apos;s request&apos;s body to stream.

    If Content-Type is non-null and r&apos;s request&apos;s header list contains no header named `Content-Type`, append `Content-Type`/Content-Type to r&apos;s Headers object. Rethrow any exception. 

[1] http://logs.glob.uno/?c=content#c259382
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1122677</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117289</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-01-17 09:24:37 +0000</bug_when>
    <thetext>https://github.com/whatwg/fetch/commit/3d9655c4024e67fe4e20e8812e96e8ffa2b3cc0d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>