summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/network/mac
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/platform/network/mac
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/platform/network/mac')
-rw-r--r--Source/WebCore/platform/network/mac/AuthenticationMac.mm15
-rw-r--r--Source/WebCore/platform/network/mac/FormDataStreamMac.mm4
-rw-r--r--Source/WebCore/platform/network/mac/ResourceHandleMac.mm7
-rw-r--r--Source/WebCore/platform/network/mac/ResourceRequestMac.mm22
4 files changed, 32 insertions, 16 deletions
diff --git a/Source/WebCore/platform/network/mac/AuthenticationMac.mm b/Source/WebCore/platform/network/mac/AuthenticationMac.mm
index efa42d9..a187187 100644
--- a/Source/WebCore/platform/network/mac/AuthenticationMac.mm
+++ b/Source/WebCore/platform/network/mac/AuthenticationMac.mm
@@ -31,6 +31,7 @@
#import "AuthenticationClient.h"
#import "Credential.h"
#import "ProtectionSpace.h"
+#import <wtf/UnusedParam.h>
#import <Foundation/NSURLAuthenticationChallenge.h>
#import <Foundation/NSURLCredential.h>
@@ -86,6 +87,20 @@ using namespace WebCore;
m_client->receivedCancellation(core(challenge));
}
+- (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
+{
+ // FIXME: <rdar://problem/8995483> Determine what, if anything, we should do here.
+ ASSERT_NOT_REACHED();
+ UNUSED_PARAM(challenge);
+}
+
+- (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge
+{
+ // FIXME: <rdar://problem/8995483> Determine what, if anything, we should do here.
+ ASSERT_NOT_REACHED();
+ UNUSED_PARAM(challenge);
+}
+
@end
namespace WebCore {
diff --git a/Source/WebCore/platform/network/mac/FormDataStreamMac.mm b/Source/WebCore/platform/network/mac/FormDataStreamMac.mm
index 03f4579..eb6f601 100644
--- a/Source/WebCore/platform/network/mac/FormDataStreamMac.mm
+++ b/Source/WebCore/platform/network/mac/FormDataStreamMac.mm
@@ -185,9 +185,7 @@ static bool advanceCurrentStream(FormStreamFields* form)
}
#endif
const String& path = nextInput.m_shouldGenerateFile ? nextInput.m_generatedFilename : nextInput.m_filename;
- RetainPtr<CFStringRef> filename(AdoptCF, path.createCFString());
- RetainPtr<CFURLRef> fileURL(AdoptCF, CFURLCreateWithFileSystemPath(0, filename.get(), kCFURLPOSIXPathStyle, FALSE));
- form->currentStream = CFReadStreamCreateWithFile(0, fileURL.get());
+ form->currentStream = CFReadStreamCreateWithFile(0, pathAsURL(path).get());
if (!form->currentStream) {
// The file must have been removed or become unreadable.
return false;
diff --git a/Source/WebCore/platform/network/mac/ResourceHandleMac.mm b/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
index 84b656c..2d687c0 100644
--- a/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
+++ b/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
@@ -164,12 +164,7 @@ public:
#ifndef BUILDING_ON_TIGER
static String encodeBasicAuthorization(const String& user, const String& password)
{
- CString unencodedString = (user + ":" + password).utf8();
- Vector<char> unencoded(unencodedString.length());
- std::copy(unencodedString.data(), unencodedString.data() + unencodedString.length(), unencoded.begin());
- Vector<char> encoded;
- base64Encode(unencoded, encoded);
- return String(encoded.data(), encoded.size());
+ return base64Encode((user + ":" + password).utf8());
}
#endif
diff --git a/Source/WebCore/platform/network/mac/ResourceRequestMac.mm b/Source/WebCore/platform/network/mac/ResourceRequestMac.mm
index f0357e5..640d237 100644
--- a/Source/WebCore/platform/network/mac/ResourceRequestMac.mm
+++ b/Source/WebCore/platform/network/mac/ResourceRequestMac.mm
@@ -31,6 +31,8 @@
#import "WebCoreSystemInterface.h"
#import "FormDataStreamMac.h"
+#import "ResourceRequestCFNet.h"
+#import "WebCoreSystemInterface.h"
#import <Foundation/Foundation.h>
@@ -65,7 +67,12 @@ void ResourceRequest::doUpdateResourceRequest()
if (NSString* method = [m_nsRequest.get() HTTPMethod])
m_httpMethod = method;
m_allowCookies = [m_nsRequest.get() HTTPShouldHandleCookies];
-
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (isHTTPPipeliningEnabled() && !shouldForceHTTPPipeliningPriorityHigh())
+ m_priority = mapHTTPPipeliningPriorityToResourceLoadPriority(wkGetHTTPPipeliningPriority(m_nsRequest.get()));
+#endif
+
NSDictionary *headers = [m_nsRequest.get() allHTTPHeaderFields];
NSEnumerator *e = [headers keyEnumerator];
NSString *name;
@@ -111,6 +118,13 @@ void ResourceRequest::doUpdatePlatformRequest()
wkSupportsMultipartXMixedReplace(nsRequest);
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (isHTTPPipeliningEnabled()) {
+ int priority = mapResourceLoadPriorityToHTTPPipeliningPriority(m_priority);
+ wkSetHTTPPipeliningPriority(nsRequest, shouldForceHTTPPipeliningPriorityHigh() ? 2 : priority);
+ }
+#endif
+
[nsRequest setCachePolicy:(NSURLRequestCachePolicy)cachePolicy()];
if (timeoutInterval() != unspecifiedTimeoutInterval)
[nsRequest setTimeoutInterval:timeoutInterval()];
@@ -154,12 +168,6 @@ void ResourceRequest::applyWebArchiveHackForMail()
// Hack because Mail checks for this property to detect data / archive loads
[NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)nsURLRequest()];
}
-
-unsigned initializeMaximumHTTPConnectionCountPerHost()
-{
- static const unsigned preferredConnectionCount = 6;
- return wkInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);
-}
} // namespace WebCore