Commit 1182ba0c authored by hausmann's avatar hausmann
Browse files

In QWebPage::open(const QUrl &, const QHttpRequestHeader &, ...) don't make the population

of the WebCore::ResourceRequest depend on the validity of the QHttpRequestHeader but just
pick the individual fields if we can use them.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 06cba1a7
......@@ -139,16 +139,16 @@ void QWebPage::open(const QUrl &url, const QHttpRequestHeader &httpHeader, const
d->insideOpenCall = true;
WebCore::ResourceRequest request(KURL(url.toString()));
if (httpHeader.isValid()) {
request.setHTTPMethod(httpHeader.method());
foreach (QString key, httpHeader.keys()) {
request.addHTTPHeaderField(key, httpHeader.value(key));
}
if (!postData.isEmpty()) {
WTF::RefPtr<WebCore::FormData> formData = new WebCore::FormData(postData.constData(), postData.size());
request.setHTTPBody(formData);
}
QString method = httpHeader.method();
if (!method.isEmpty())
request.setHTTPMethod(method);
foreach (QString key, httpHeader.keys())
request.addHTTPHeaderField(key, httpHeader.value(key));
if (!postData.isEmpty()) {
WTF::RefPtr<WebCore::FormData> formData = new WebCore::FormData(postData.constData(), postData.size());
request.setHTTPBody(formData);
}
mainFrame()->d->frame->loader()->load(request);
......
2007-06-13 Simon Hausmann <hausmann@kde.org>
Reviewed by Lars.
In QWebPage::open(const QUrl &, const QHttpRequestHeader &, ...) don't make the population
of the WebCore::ResourceRequest depend on the validity of the QHttpRequestHeader but just
pick the individual fields if we can use them.
* Api/qwebpage.cpp:
(QWebPage::open):
2007-06-13 Simon Hausmann <hausmann@kde.org>
Reviewed by Lars.
......
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