Skip to content
Permalink
Browse files
2010-03-02 Andreas Kling <andreas.kling@nokia.com>
        Reviewed by Simon Hausmann.

        [Qt] Support the HTTP OPTIONS verb (needed for preflight requests)

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

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
        (WebCore::QNetworkReplyHandler::start):

Canonical link: https://commits.webkit.org/46749@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Mar 3, 2010
1 parent 1b52d42 commit 4ce1dc4022c235391e1686ebc56376b937736e23
Showing 2 changed files with 22 additions and 0 deletions.
@@ -1,3 +1,15 @@
2010-03-02 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Simon Hausmann.

[Qt] Support the HTTP OPTIONS verb (needed for preflight requests)

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

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
(WebCore::QNetworkReplyHandler::start):

2010-03-02 Evan Stade <estade@chromium.org>

Reviewed by David Levin.
@@ -21,6 +21,7 @@
#include "config.h"
#include "QNetworkReplyHandler.h"

#include "CString.h"
#include "HTTPParsers.h"
#include "MIMETypeRegistry.h"
#include "ResourceHandle.h"
@@ -151,6 +152,10 @@ QNetworkReplyHandler::QNetworkReplyHandler(ResourceHandle* handle, LoadMode load
#if QT_VERSION >= 0x040600
else if (r.httpMethod() == "DELETE")
m_method = QNetworkAccessManager::DeleteOperation;
#endif
#if QT_VERSION >= 0x040700
else if (r.httpMethod() == "OPTIONS")
m_method = QNetworkAccessManager::CustomOperation;
#endif
else
m_method = QNetworkAccessManager::UnknownOperation;
@@ -436,6 +441,11 @@ void QNetworkReplyHandler::start()
m_reply = manager->deleteResource(m_request);
break;
}
#endif
#if QT_VERSION >= 0x040700
case QNetworkAccessManager::CustomOperation:
m_reply = manager->sendCustomRequest(m_request, m_resourceHandle->request().httpMethod().latin1().data());
break;
#endif
case QNetworkAccessManager::UnknownOperation: {
m_reply = 0;

0 comments on commit 4ce1dc4

Please sign in to comment.