[Qt-interest] QWebkit code

felipe ortiz f.ortiz.c at gmail.com
Tue Jul 6 20:53:09 CEST 2010


Hi, today I find a wire code an comments in
src/3rdparty/webkit/WebCore/loader/loader.cpp:239 in this place, in QT 4.5.2
you can find this lines:

KURL referrer = docLoader->doc()->url();
if ((referrer.protocolIs("http") || referrer.protocolIs("https")) &&
referrer.path().isEmpty())
     referrer.setPath("/");
resourceRequest.setHTTPReferrer(referrer.string());
FrameLoader::addHTTPOriginIfNeeded(resourceRequest,
docLoader->doc()->securityOrigin()->toString());

This lines set the httpReferrrer in a ResourceRequest object, but now in
4.6.3 you can find only a comment:

" // Do not set the referrer or HTTP origin here. That's handled by
SubresourceLoader::create."

I check SubresourceLoader::create but is nearly equal to 4.5.2 version, some
changes like now this function use SecurityOrigin instead of FrameLoader but
the final result is the same, except for one thing, the ResourceRequest in
this function haven't a httpReferrer ... why?

In the 4.5.2 I use this to know what are ajax because ajax calls haven't
this attribute. I solve this add the olders lines in loader.cpp but I don't
know if it is a problem.

Somebody know how if it a problem add this lines again? or how can I know
when a call is ajax?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100706/53dc49bb/attachment.html 


More information about the Qt-interest-old mailing list