<?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>108148</bug_id>
          
          <creation_ts>2013-01-28 21:25:40 -0800</creation_ts>
          <short_desc>Wrong default Content-Type set in XMLHttpRequest.send(String)</short_desc>
          <delta_ts>2013-01-28 22:59:26 -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>XML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>99973</dup_id>
          
          <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>0</everconfirmed>
          <reporter name="Victor Costan">costan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>818473</commentid>
    <comment_count>0</comment_count>
    <who name="Victor Costan">costan</who>
    <bug_when>2013-01-28 21:25:40 -0800</bug_when>
    <thetext>UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.27 (KHTML, like Gecko) Chrome/26.0.1386.0 Safari/537.27

Steps to reproduce the problem:
1. Run the following JavaScript
xhr = new XMLHttpRequest
xhr.open(&apos;POST&apos;, window.location.href, false);
xhr.send(&apos;Hello world!&apos;)
2. Open the developer tools and check the Content-Type of the request.

What is the expected behavior?
The Content-Type should be &quot;text/plain;charset=UTF-8&quot;.

See step 4, subsection &quot;string&quot; in http://www.w3.org/TR/XMLHttpRequest/#the-send()-method

What went wrong?
Chrome seems to use &quot;application/xml&quot; as the default Content-Type when the XMLHttpRequest#send() argument is a String.

Did this work before? No 

Chrome version: 26.0.1386.0  Channel: dev
OS Version: Fedora x84_64

Firefox sends the &quot;text/plain; charset=UTF-8&quot; Content-Type, which is almost correct.

I am working on a WebKit patch for this issue. I have the code patch, and I&apos;m currently working on a layout test and figuring out the contribution guide.

This bug appears to address a subset of 11049, but the patch attached there does not seem to cover the case that my patch addresses.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>818475</commentid>
    <comment_count>1</comment_count>
    <who name="Victor Costan">costan</who>
    <bug_when>2013-01-28 21:26:48 -0800</bug_when>
    <thetext>This bug is also posted in the Chromium tracker: http://crbug.com/172802</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>818579</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-01-28 22:59:26 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 99973 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>