Rename URL type variables in Curl network backend.

https://bugs.webkit.org/show_bug.cgi?id=122158

Patch by Szabolcs Dávid <davidsz@inf.u-szeged.hu> on 2013-10-01
Reviewed by Darin Adler.

I changed the name of the URL objects to match with the new class name.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getProtectionSpace):
(WebCore::ResourceHandleManager::initializeHandle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e3e46d22
2013-10-01 Szabolcs Dávid <davidsz@inf.u-szeged.hu>
Rename URL type variables in Curl network backend.
https://bugs.webkit.org/show_bug.cgi?id=122158
Reviewed by Darin Adler.
I changed the name of the URL objects to match with the new class name.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getProtectionSpace):
(WebCore::ResourceHandleManager::initializeHandle):
2013-10-01 Myles C. Maxfield <mmaxfield@apple.com>
Center misspelling dots across width of word
......@@ -306,15 +306,15 @@ static bool getProtectionSpace(CURL* h, const ResourceResponse& response, Protec
if (err != CURLE_OK)
return false;
const char* url = 0;
err = curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &url);
const char* effectiveUrl = 0;
err = curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &effectiveUrl);
if (err != CURLE_OK)
return false;
URL kurl(ParsedURLString, url);
URL url(ParsedURLString, effectiveUrl);
String host = kurl.host();
String protocol = kurl.protocol();
String host = url.host();
String protocol = url.protocol();
String realm;
......@@ -875,20 +875,20 @@ void ResourceHandleManager::applyAuthenticationToRequest(ResourceHandle* handle,
void ResourceHandleManager::initializeHandle(ResourceHandle* job)
{
static const int allowedProtocols = CURLPROTO_FILE | CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_HTTP | CURLPROTO_HTTPS;
URL kurl = job->firstRequest().url();
URL url = job->firstRequest().url();
// Remove any fragment part, otherwise curl will send it as part of the request.
kurl.removeFragmentIdentifier();
url.removeFragmentIdentifier();
ResourceHandleInternal* d = job->getInternal();
String url = kurl.string();
String urlString = url.string();
if (kurl.isLocalFile()) {
if (url.isLocalFile()) {
// Remove any query part sent to a local file.
if (!kurl.query().isEmpty()) {
if (!url.query().isEmpty()) {
// By setting the query to a null string it'll be removed.
kurl.setQuery(String());
url = kurl.string();
url.setQuery(String());
urlString = url.string();
}
// Determine the MIME type based on the path.
d->m_response.setMimeType(MIMETypeRegistry::getMIMETypeForPath(url));
......@@ -935,7 +935,7 @@ void ResourceHandleManager::initializeHandle(ResourceHandle* job)
ASSERT(!d->m_url);
// url is in ASCII so latin1() will only convert it to char* without character translation.
d->m_url = fastStrDup(url.latin1().data());
d->m_url = fastStrDup(urlString.latin1().data());
curl_easy_setopt(d->m_handle, CURLOPT_URL, d->m_url);
if (m_cookieJarFileName)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment