Cross-protocol, cross-site scripting (XPSS) using HTML forms
[WebKit-https.git] / Source / WebCore / platform / network / cf / ResourceResponseCFNet.cpp
index b011a57..1390a48 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2006-2007, 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
 
 #if USE(CFNETWORK)
 
+#include "CFNetworkSPI.h"
+
 #include "HTTPParsers.h"
 #include "MIMETypeRegistry.h"
-#include <CFNetwork/CFURLResponsePriv.h>
 #include <wtf/RetainPtr.h>
 
 #if PLATFORM(COCOA)
@@ -85,6 +86,8 @@ void ResourceResponse::platformLazyInit(InitLevel initLevel)
 
         CFHTTPMessageRef httpResponse = CFURLResponseGetHTTPResponse(m_cfResponse.get());
         if (httpResponse) {
+            RetainPtr<CFStringRef> messageString = adoptCF(CFHTTPMessageCopyVersion(httpResponse));
+            m_httpVersion = String(messageString.get()).upper();
             m_httpStatusCode = CFHTTPMessageGetResponseStatusCode(httpResponse);
             
             if (initLevel < AllFields) {