[webkit-help] Does WebKit have http connecting module?

Yanke (Yon) Hu huyanke at gmail.com
Wed May 11 15:59:57 PDT 2011


hi, Thank you for your answer!!

Certainly WebKit will have some module for initializing network request.

We know that Webkit doesn't implement http request. They just call http api
on different platforms like QnetworkRequest from Qt, soup from gtk, etc.

I am pretty sure for QtWebKit, proxy setting is not from WebKit module, but
from QNetwork module. They even delete
WebKit/src/WebCore/platform/network/ProxyServer.cpp files in Qt, meaning you
cannot find ProxyServer.cpp files in
Qt/src/3rdparty/webkit/WebCore/platform/network .

Thank you for showing me this directory, I didn't notice that previously. It
looks like WebKit/src/WebCore/platform/network also include a curl port, and
implementing http request and proxy setting there ,but need libcurl.

Thanks very much, and have a great day!!




On Tue, May 10, 2011 at 10:12 PM, I Luv Code <iluvcode at gmail.com> wrote:

> Hi,
>
> WebKit has both network + rendering support. For network, there is
> ResourceHandleManager & related files, and the actual port related network
> code has to be hooked into here.
>
> Regarding your question on proxy, see the below lines in
> ResourceHandleManager::initializeHandle (Windows build)
>
>         curl_easy_setopt(d->m_handle, CURLOPT_PROXY,
> m_proxy.utf8().data());
>         curl_easy_setopt(d->m_handle, CURLOPT_PROXYTYPE, m_proxyType);
>
> & the proxy in for being set from WebCore::Settings. Does this answer your
> question?
>
> Thanks.
>
> On Wed, May 11, 2011 at 1:00 AM, Yanke (Yon) Hu <huyanke at gmail.com> wrote:
>
>> hi,
>>
>> I am a beginner of WebKit. It looks like WebKit doesn't have an API about
>> setting proxy.
>>
>> Previously when I was using Molliza sdk, I can set proxy by:
>>
>> nsCOMPtr<nsIProtocolProxyService> proxyService =
>>         do_GetService("@mozilla.org/network/protocol-proxy-service;1",
>> &nrv);
>>
>> An interesting thing is:  When you want to set proxy in Chrome or Safari,
>> actually you are setting system level proxy. I guess the proxy module in
>> Chrome and Safari is not related to WebKit module, but not sure.
>>
>> I find in QT, you can set proxy in application by :
>>
>> #include <QNetworkProxy>
>> ……
>> QNetworkProxy * proxy = new QNetworkProxy();
>> proxy->setHostName("localhost");
>> proxy->setPort(8888);
>> proxy->setType(QNetworkProxy::HttpProxy);
>> QNetworkProxy::setApplicationProxy(*proxy);
>>
>> Many QtWebKit based open source browser implement the proxy in this way.
>> This module looks not related to QtWebKit, but belongs to QtCore.
>>
>> So does this mean WebKit is just for rendering, and it doesn't have module
>> for http conecting? I previously thought WebKit should have every module
>> like Molliza Gecko. Browsers based on WebKit will just need to implement UI.
>> But the thing doesn't look like this..
>>
>> Thanks for any help!!
>>
>> Cheers,
>> Yanke
>>
>> --
>>
>> Yanke Hu
>> phone: (469) 644-8799
>> email: huyanke at gmail.com
>>
>> _______________________________________________
>> webkit-help mailing list
>> webkit-help at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>>
>>
>


-- 

Yanke Hu
phone: (469) 644-8799
email: huyanke at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110511/96c8bcbf/attachment.html>


More information about the webkit-help mailing list