[webkit-dev] [WinCairo] Can not get Mime from https through a proxy

Brent Fulgham bfulgham at gmail.com
Sun Feb 26 13:39:54 PST 2012


Do you have the cacert.pem file in the WebKit.resources folder? Queries via https will fail without it.

-Brent

Sent from my iPhone

On Feb 26, 2012, at 2:32 AM, Carlos Díez Fernández <carlosdf at gmail.com> wrote:

> Hello,
> 
> I'm using Webkit Wincairo (from trunk) release behind a proxy with the
> environment variable "http_proxy" set for curl to use it.
> To do the request I use the following code (this is C# using WebKit Interop)):
> 
>                WebMutableURLRequest request = new WebMutableURLRequestClass();
>                request.initWithURL(url,
> _WebURLRequestCachePolicy.WebURLRequestUseProtocolCachePolicy, 60);
>                request.setHTTPMethod("GET");
> 
> When I navigate through HTTP pages everything works fine, but if I go
> to a HTTPS site, webkit sends a error
> (didFailProvisionalLoadWithError)
> 
> Debugging WebKit I found that in
> Source/WebCore/platform/network/curl/ResourceHandleManager.cpp) on
> "headerCallback" method
> the line "d->m_response.setMimeType(extractMIMETypeFromMediaType(d->m_response.httpHeaderField("Content-Type")));"
> sets a empty MimeType because the http headers are void (the hashmap is void).
> And then canShowMime() returns false and WebKit throws the
> "didFailProvisionalLoadWithError" error.
> 
> I tested this with 0.5 release of WebKit.net (with a precompiled
> webkit release) and I got the same error.
> 
> I found interesting that if I load the google home page and I go to a
> HTTPS site it works.
> I do not know if google page does a HTTP redirect and the MimeType is
> extracted from the original HTTP request.
> 
> Also if I force canShowMime() to true, the HTTPS request works. And
> also If I do not use a proxy, everything works fine.
> I tested my code with Apple libraries instead of Wincairo and with
> Apple libraries it works well.
> 
> Did someone got the same error? I'm doing the request wrong?
> I tried to go deep into the error but I'm lost, i don't know if this
> is a libcurl bug or webkit.
> 
> Thanks,
> Carlos Díez
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


More information about the webkit-dev mailing list