<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206901] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206901">206901</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-06 23:01:24 -0700 (Thu, 06 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a place for common HTTP Header values
https://bugs.webkit.org/show_bug.cgi?id=163002

Patch by Youenn Fablet &lt;youenn@apple.com&gt; on 2016-10-06
Reviewed by Alex Christensen.

No change of behavior.

Introducing HTTPHeaderValues with two Content-Type values.

* CMakeLists.txt:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* WebCore.xcodeproj/project.pbxproj:
* platform/network/HTTPHeaderValues.cpp: Added.
(WebCore::HTTPHeaderValues::TextPlainContentType):
(WebCore::HTTPHeaderValues::FormURLEncodedContentType):
* platform/network/HTTPHeaderValues.h: Added.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchBodycpp">trunk/Source/WebCore/Modules/fetch/FetchBody.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorexmlXMLHttpRequestcpp">trunk/Source/WebCore/xml/XMLHttpRequest.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPHeaderValuescpp">trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPHeaderValuesh">trunk/Source/WebCore/platform/network/HTTPHeaderValues.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (206900 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-07 06:00:10 UTC (rev 206900)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -2343,6 +2343,7 @@
</span><span class="cx">     platform/network/FormData.cpp
</span><span class="cx">     platform/network/FormDataBuilder.cpp
</span><span class="cx">     platform/network/HTTPHeaderMap.cpp
</span><ins>+    platform/network/HTTPHeaderValues.cpp
</ins><span class="cx">     platform/network/HTTPParsers.cpp
</span><span class="cx">     platform/network/MIMEHeader.cpp
</span><span class="cx">     platform/network/NetworkStateNotifier.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206900 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-07 06:00:10 UTC (rev 206900)
+++ trunk/Source/WebCore/ChangeLog        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -1,5 +1,27 @@
</span><span class="cx"> 2016-10-06  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Add a place for common HTTP Header values
+        https://bugs.webkit.org/show_bug.cgi?id=163002
+
+        Reviewed by Alex Christensen.
+
+        No change of behavior.
+
+        Introducing HTTPHeaderValues with two Content-Type values.
+
+        * CMakeLists.txt:
+        * Modules/fetch/FetchBody.cpp:
+        (WebCore::FetchBody::extract):
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/network/HTTPHeaderValues.cpp: Added.
+        (WebCore::HTTPHeaderValues::TextPlainContentType):
+        (WebCore::HTTPHeaderValues::FormURLEncodedContentType):
+        * platform/network/HTTPHeaderValues.h: Added.
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::send):
+
+2016-10-06  Youenn Fablet  &lt;youenn@apple.com&gt;
+
</ins><span class="cx">         CachedResourceRequest should not need to store defer and preload options
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=163004
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchBodycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchBody.cpp (206900 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchBody.cpp        2016-10-07 06:00:10 UTC (rev 206900)
+++ trunk/Source/WebCore/Modules/fetch/FetchBody.cpp        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;FetchHeaders.h&quot;
</span><span class="cx"> #include &quot;FetchResponseSource.h&quot;
</span><span class="cx"> #include &quot;FormData.h&quot;
</span><ins>+#include &quot;HTTPHeaderValues.h&quot;
</ins><span class="cx"> #include &quot;HTTPParsers.h&quot;
</span><span class="cx"> #include &quot;JSBlob.h&quot;
</span><span class="cx"> #include &quot;JSDOMFormData.h&quot;
</span><span class="lines">@@ -62,11 +63,11 @@
</span><span class="cx">         return FetchBody(WTFMove(formData));
</span><span class="cx">     }
</span><span class="cx">     if (value.isString()) {
</span><del>-        contentType = ASCIILiteral(&quot;text/plain;charset=UTF-8&quot;);
</del><ins>+        contentType = HTTPHeaderValues::TextPlainContentType();
</ins><span class="cx">         return FetchBody(value.toWTFString(&amp;state));
</span><span class="cx">     }
</span><span class="cx">     if (value.inherits(JSURLSearchParams::info())) {
</span><del>-        contentType = ASCIILiteral(&quot;application/x-www-form-urlencoded;charset=UTF-8&quot;);
</del><ins>+        contentType = HTTPHeaderValues::FormURLEncodedContentType();
</ins><span class="cx">         return FetchBody(*JSURLSearchParams::toWrapped(value));
</span><span class="cx">     }
</span><span class="cx">     if (value.inherits(JSReadableStream::info()))
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206900 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-07 06:00:10 UTC (rev 206900)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -1520,6 +1520,8 @@
</span><span class="cx">                 4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */; };
</span><span class="cx">                 4157AF8012F1FB0400A8C6F5 /* MediaControlsApple.h in Headers */ = {isa = PBXBuildFile; fileRef = 4157AF7E12F1FB0400A8C6F5 /* MediaControlsApple.h */; };
</span><span class="cx">                 4157AF8112F1FB0400A8C6F5 /* MediaControlsApple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4157AF7F12F1FB0400A8C6F5 /* MediaControlsApple.cpp */; };
</span><ins>+                41614A781DA6423B004AD06F /* HTTPHeaderValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41614A761DA64236004AD06F /* HTTPHeaderValues.cpp */; };
+                41614A791DA64241004AD06F /* HTTPHeaderValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 41614A771DA64236004AD06F /* HTTPHeaderValues.h */; };
</ins><span class="cx">                 4162A450101145AE00DFF3ED /* DedicatedWorkerGlobalScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4162A44D101145AE00DFF3ED /* DedicatedWorkerGlobalScope.cpp */; };
</span><span class="cx">                 4162A451101145AE00DFF3ED /* DedicatedWorkerGlobalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 4162A44E101145AE00DFF3ED /* DedicatedWorkerGlobalScope.h */; };
</span><span class="cx">                 4162A454101145E300DFF3ED /* JSDedicatedWorkerGlobalScopeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4162A453101145E300DFF3ED /* JSDedicatedWorkerGlobalScopeCustom.cpp */; };
</span><span class="lines">@@ -8467,6 +8469,8 @@
</span><span class="cx">                 4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SliderThumbElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4157AF7E12F1FB0400A8C6F5 /* MediaControlsApple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControlsApple.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4157AF7F12F1FB0400A8C6F5 /* MediaControlsApple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControlsApple.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                41614A761DA64236004AD06F /* HTTPHeaderValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderValues.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41614A771DA64236004AD06F /* HTTPHeaderValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPHeaderValues.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 4162A44D101145AE00DFF3ED /* DedicatedWorkerGlobalScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DedicatedWorkerGlobalScope.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4162A44E101145AE00DFF3ED /* DedicatedWorkerGlobalScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DedicatedWorkerGlobalScope.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4162A44F101145AE00DFF3ED /* DedicatedWorkerGlobalScope.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DedicatedWorkerGlobalScope.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17042,6 +17046,8 @@
</span><span class="cx">                                 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */,
</span><span class="cx">                                 514C765C0CE923A1007EF3CD /* HTTPHeaderMap.h */,
</span><span class="cx">                                 1AC900BF1943AF3D008625B5 /* HTTPHeaderNames.in */,
</span><ins>+                                41614A761DA64236004AD06F /* HTTPHeaderValues.cpp */,
+                                41614A771DA64236004AD06F /* HTTPHeaderValues.h */,
</ins><span class="cx">                                 514C765D0CE923A1007EF3CD /* HTTPParsers.cpp */,
</span><span class="cx">                                 514C765E0CE923A1007EF3CD /* HTTPParsers.h */,
</span><span class="cx">                                 37DDCD9213844FD50008B793 /* MIMEHeader.cpp */,
</span><span class="lines">@@ -27132,6 +27138,7 @@
</span><span class="cx">                                 976D6C7C122B8A3D001FD1F7 /* WebKitBlobBuilder.h in Headers */,
</span><span class="cx">                                 3106037014327D2E00ABF4BA /* WebKitCSSFilterValue.h in Headers */,
</span><span class="cx">                                 498391590F1E776900C23782 /* WebKitCSSMatrix.h in Headers */,
</span><ins>+                                41614A791DA64241004AD06F /* HTTPHeaderValues.h in Headers */,
</ins><span class="cx">                                 8AA61D00144D595B00F37350 /* WebKitCSSRegionRule.h in Headers */,
</span><span class="cx">                                 BC9ADD230CC4032600098C4C /* WebKitCSSTransformValue.h in Headers */,
</span><span class="cx">                                 3FFFF9A9159D9A550020BBD5 /* WebKitCSSViewportRule.h in Headers */,
</span><span class="lines">@@ -30609,6 +30616,7 @@
</span><span class="cx">                                 E453904D0EAFD637003695C8 /* WidgetIOS.mm in Sources */,
</span><span class="cx">                                 9380F47809A11ACC001FDB34 /* WidgetMac.mm in Sources */,
</span><span class="cx">                                 939B02EE0EA2DBC400C54570 /* WidthIterator.cpp in Sources */,
</span><ins>+                                41614A781DA6423B004AD06F /* HTTPHeaderValues.cpp in Sources */,
</ins><span class="cx">                                 0F15ED5B1B7EC7C500EDDFEB /* WillChangeData.cpp in Sources */,
</span><span class="cx">                                 BC8243E80D0CFD7500460C8F /* WindowFeatures.cpp in Sources */,
</span><span class="cx">                                 7E99AF510B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPHeaderValuescpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp (0 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;HTTPHeaderValues.h&quot;
+
+#include &lt;wtf/NeverDestroyed.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+const String&amp; HTTPHeaderValues::TextPlainContentType()
+{
+    static NeverDestroyed&lt;const String&gt; contentType(ASCIILiteral(&quot;text/plain;charset=UTF-8&quot;));
+    return contentType;
+}
+
+const String&amp; HTTPHeaderValues::FormURLEncodedContentType()
+{
+    static NeverDestroyed&lt;const String&gt; contentType(ASCIILiteral(&quot;application/x-www-form-urlencoded;charset=UTF-8&quot;));
+    return contentType;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPHeaderValuesh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/HTTPHeaderValues.h (0 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPHeaderValues.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderValues.h        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &lt;wtf/Forward.h&gt;
+
+namespace WebCore {
+
+struct HTTPHeaderValues {
+    static const String&amp; TextPlainContentType();
+    static const String&amp; FormURLEncodedContentType();
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorexmlXMLHttpRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (206900 => 206901)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2016-10-07 06:00:10 UTC (rev 206900)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2016-10-07 06:01:24 UTC (rev 206901)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;File.h&quot;
</span><span class="cx"> #include &quot;HTMLDocument.h&quot;
</span><span class="cx"> #include &quot;HTTPHeaderNames.h&quot;
</span><ins>+#include &quot;HTTPHeaderValues.h&quot;
</ins><span class="cx"> #include &quot;HTTPParsers.h&quot;
</span><span class="cx"> #include &quot;InspectorInstrumentation.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="lines">@@ -566,7 +567,7 @@
</span><span class="cx">                 m_requestHeaders.set(HTTPHeaderName::ContentType, ASCIILiteral(&quot;application/x-www-form-urlencoded&quot;));
</span><span class="cx">             else
</span><span class="cx"> #endif
</span><del>-                m_requestHeaders.set(HTTPHeaderName::ContentType, ASCIILiteral(&quot;text/plain;charset=UTF-8&quot;));
</del><ins>+                m_requestHeaders.set(HTTPHeaderName::ContentType, HTTPHeaderValues::TextPlainContentType());
</ins><span class="cx">         } else {
</span><span class="cx">             replaceCharsetInMediaType(contentType, &quot;UTF-8&quot;);
</span><span class="cx">             m_requestHeaders.set(HTTPHeaderName::ContentType, contentType);
</span></span></pre>
</div>
</div>

</body>
</html>