Commit b5f57fc0 authored by eric@webkit.org's avatar eric@webkit.org
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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 28ad61de
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;
......
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