<!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>[195004] 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/195004">195004</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2016-01-13 17:29:17 -0800 (Wed, 13 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Cross-protocol, cross-site scripting (XPSS) using HTML forms
https://bugs.webkit.org/show_bug.cgi?id=153017
<rdar://problem/5873254>
Reviewed by David Kilzer.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): If response HTTP version is 0.9,
sandbox against script execution and plugins.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse): Ditto.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Ditto.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt): Update for HTTP version.
(WebCore::ResourceResponseBase::copyData): Ditto.
(WebCore::ResourceResponseBase::httpVersion): Added.
(WebCore::ResourceResponseBase::setHTTPVersion): Ditto.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode): Update for HTTP version.
(WebCore::ResourceResponseBase::decode): Ditto.
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit): Capture HTTP version.
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformLazyInit): Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoadercpp">trunk/Source/WebCore/loader/SubresourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBasecpp">trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBaseh">trunk/Source/WebCore/platform/network/ResourceResponseBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaResourceResponseCocoamm">trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/ChangeLog        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-01-13 Brent Fulgham <bfulgham@apple.com>
+
+ Cross-protocol, cross-site scripting (XPSS) using HTML forms
+ https://bugs.webkit.org/show_bug.cgi?id=153017
+ <rdar://problem/5873254>
+
+ Reviewed by David Kilzer.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::responseReceived): If response HTTP version is 0.9,
+ sandbox against script execution and plugins.
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::didReceiveResponse): Ditto.
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::didReceiveResponse): Ditto.
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::adopt): Update for HTTP version.
+ (WebCore::ResourceResponseBase::copyData): Ditto.
+ (WebCore::ResourceResponseBase::httpVersion): Added.
+ (WebCore::ResourceResponseBase::setHTTPVersion): Ditto.
+ * platform/network/ResourceResponseBase.h:
+ (WebCore::ResourceResponseBase::encode): Update for HTTP version.
+ (WebCore::ResourceResponseBase::decode): Ditto.
+ * platform/network/cf/ResourceResponseCFNet.cpp:
+ (WebCore::ResourceResponse::platformLazyInit): Capture HTTP version.
+ * platform/network/cocoa/ResourceResponseCocoa.mm:
+ (WebCore::ResourceResponse::platformLazyInit): Ditto.
+
</ins><span class="cx"> 2016-01-13 Beth Dakin <bdakin@apple.com>
</span><span class="cx">
</span><span class="cx"> WK2: Request completion candidates when needed
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006-2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2011 Google Inc. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -684,6 +684,14 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ if (m_response.isHttpVersion0_9()) {
+ ASSERT(m_identifierForLoadWithoutResourceLoader || m_mainResource);
+ unsigned long identifier = m_identifierForLoadWithoutResourceLoader ? m_identifierForLoadWithoutResourceLoader : m_mainResource->identifier();
+ String message = "Sandboxing '" + response.url().string() + "' because it is using HTTP/0.9.";
+ m_frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, identifier);
+ frameLoader()->forceSandboxFlags(SandboxScripts | SandboxPlugins);
+ }
+
</ins><span class="cx"> frameLoader()->policyChecker().checkContentPolicy(m_response, [this](PolicyAction policy) {
</span><span class="cx"> continueAfterContentPolicy(policy);
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006-2007, 2010-2011, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -439,6 +439,12 @@
</span><span class="cx">
</span><span class="cx"> m_response = r;
</span><span class="cx">
</span><ins>+ if (m_response.isHttpVersion0_9()) {
+ String message = "Sandboxing '" + m_response.url().string() + "' because it is using HTTP/0.9.";
+ m_frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, m_identifier);
+ frameLoader()->forceSandboxFlags(SandboxScripts | SandboxPlugins);
+ }
+
</ins><span class="cx"> if (FormData* data = m_request.httpBody())
</span><span class="cx"> data->removeGeneratedFilesIfNeeded();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006-2007, 2009, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -210,6 +210,14 @@
</span><span class="cx"> if (shouldIncludeCertificateInfo())
</span><span class="cx"> response.includeCertificateInfo();
</span><span class="cx">
</span><ins>+ if (response.isHttpVersion0_9()) {
+ if (m_frame) {
+ String message = "Sandboxing '" + response.url().string() + "' because it is using HTTP/0.9.";
+ m_frame->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, identifier());
+ frameLoader()->forceSandboxFlags(SandboxScripts | SandboxPlugins);
+ }
+ }
+
</ins><span class="cx"> if (m_resource->resourceToRevalidate()) {
</span><span class="cx"> if (response.httpStatusCode() == 304) {
</span><span class="cx"> // 304 Not modified / Use local copy
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2009 Google Inc. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">
</span><span class="cx"> response->setHTTPStatusCode(data->m_httpStatusCode);
</span><span class="cx"> response->setHTTPStatusText(data->m_httpStatusText);
</span><ins>+ response->setHTTPVersion(data->m_httpVersion);
</ins><span class="cx">
</span><span class="cx"> response->lazyInit(AllFields);
</span><span class="cx"> response->m_httpHeaderFields.adopt(WTFMove(data->m_httpHeaders));
</span><span class="lines">@@ -89,6 +90,7 @@
</span><span class="cx"> data->m_textEncodingName = textEncodingName().isolatedCopy();
</span><span class="cx"> data->m_httpStatusCode = httpStatusCode();
</span><span class="cx"> data->m_httpStatusText = httpStatusText().isolatedCopy();
</span><ins>+ data->m_httpVersion = httpVersion().isolatedCopy();
</ins><span class="cx"> data->m_httpHeaders = httpHeaderFields().copyData();
</span><span class="cx"> data->m_resourceLoadTiming = m_resourceLoadTiming;
</span><span class="cx"> return asResourceResponse().doPlatformCopyData(WTFMove(data));
</span><span class="lines">@@ -224,6 +226,29 @@
</span><span class="cx"> // FIXME: Should invalidate or update platform response if present.
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+const String& ResourceResponseBase::httpVersion() const
+{
+ lazyInit(AllFields);
+
+ return m_httpVersion;
+}
+
+void ResourceResponseBase::setHTTPVersion(const String& versionText)
+{
+ lazyInit(AllFields);
+
+ m_httpVersion = versionText;
+
+ // FIXME: Should invalidate or update platform response if present.
+}
+
+bool ResourceResponseBase::isHttpVersion0_9() const
+{
+ lazyInit(AllFields);
+
+ return m_httpVersion.startsWith("HTTP/0.9");
+}
+
</ins><span class="cx"> String ResourceResponseBase::httpHeaderField(const String& name) const
</span><span class="cx"> {
</span><span class="cx"> lazyInit(CommonFieldsOnly);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2008, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2009 Google Inc. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -72,6 +72,10 @@
</span><span class="cx"> WEBCORE_EXPORT const String& httpStatusText() const;
</span><span class="cx"> WEBCORE_EXPORT void setHTTPStatusText(const String&);
</span><span class="cx">
</span><ins>+ WEBCORE_EXPORT const String& httpVersion() const;
+ WEBCORE_EXPORT void setHTTPVersion(const String&);
+ bool isHttpVersion0_9() const;
+
</ins><span class="cx"> WEBCORE_EXPORT const HTTPHeaderMap& httpHeaderFields() const;
</span><span class="cx">
</span><span class="cx"> String httpHeaderField(const String& name) const;
</span><span class="lines">@@ -157,6 +161,7 @@
</span><span class="cx"> long long m_expectedContentLength;
</span><span class="cx"> AtomicString m_textEncodingName;
</span><span class="cx"> AtomicString m_httpStatusText;
</span><ins>+ AtomicString m_httpVersion;
</ins><span class="cx"> HTTPHeaderMap m_httpHeaderFields;
</span><span class="cx"> mutable ResourceLoadTiming m_resourceLoadTiming;
</span><span class="cx">
</span><span class="lines">@@ -197,6 +202,7 @@
</span><span class="cx"> encoder << static_cast<int64_t>(m_expectedContentLength);
</span><span class="cx"> encoder << m_textEncodingName;
</span><span class="cx"> encoder << m_httpStatusText;
</span><ins>+ encoder << m_httpVersion;
</ins><span class="cx"> encoder << m_httpHeaderFields;
</span><span class="cx"> encoder << m_resourceLoadTiming;
</span><span class="cx"> encoder << m_httpStatusCode;
</span><span class="lines">@@ -230,6 +236,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(response.m_httpStatusText))
</span><span class="cx"> return false;
</span><ins>+ if (!decoder.decode(response.m_httpVersion))
+ return false;
</ins><span class="cx"> if (!decoder.decode(response.m_httpHeaderFields))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(response.m_resourceLoadTiming))
</span><span class="lines">@@ -259,6 +267,7 @@
</span><span class="cx"> String m_textEncodingName;
</span><span class="cx"> int m_httpStatusCode;
</span><span class="cx"> String m_httpStatusText;
</span><ins>+ String m_httpVersion;
</ins><span class="cx"> std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders;
</span><span class="cx"> ResourceLoadTiming m_resourceLoadTiming;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006-2007, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,9 +28,10 @@
</span><span class="cx">
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx">
</span><ins>+#include "CFNetworkSPI.h"
+
</ins><span class="cx"> #include "HTTPParsers.h"
</span><span class="cx"> #include "MIMETypeRegistry.h"
</span><del>-#include <CFNetwork/CFURLResponsePriv.h>
</del><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -85,6 +86,8 @@
</span><span class="cx">
</span><span class="cx"> CFHTTPMessageRef httpResponse = CFURLResponseGetHTTPResponse(m_cfResponse.get());
</span><span class="cx"> if (httpResponse) {
</span><ins>+ RetainPtr<CFStringRef> messageString = adoptCF(CFHTTPMessageCopyVersion(httpResponse));
+ m_httpVersion = String(messageString.get()).upper();
</ins><span class="cx"> m_httpStatusCode = CFHTTPMessageGetResponseStatusCode(httpResponse);
</span><span class="cx">
</span><span class="cx"> if (initLevel < AllFields) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaResourceResponseCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm (195003 => 195004)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm        2016-01-14 01:12:46 UTC (rev 195003)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm        2016-01-14 01:29:17 UTC (rev 195004)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -186,6 +186,9 @@
</span><span class="cx"> if ([m_nsResponse.get() isKindOfClass:[NSHTTPURLResponse class]]) {
</span><span class="cx"> NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)m_nsResponse.get();
</span><span class="cx">
</span><ins>+ CFHTTPMessageRef messageRef = CFURLResponseGetHTTPResponse([httpResponse _CFURLResponse]);
+ RetainPtr<CFStringRef> messageString = adoptCF(CFHTTPMessageCopyVersion(messageRef));
+ m_httpVersion = String(messageString.get()).upper();
</ins><span class="cx"> m_httpStatusCode = [httpResponse statusCode];
</span><span class="cx">
</span><span class="cx"> if (initLevel < AllFields) {
</span></span></pre>
</div>
</div>
</body>
</html>