Holger Hans Peter Freyther <holger.freyther@trolltech.com>
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2008 10:37:18 +0000 (10:37 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2008 10:37:18 +0000 (10:37 +0000)
* httpBody() can return 0 and other ports (cf/mac) check for this condition
* Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
  as well.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/qt/QNetworkReplyHandler.cpp

index e6314a7..d2e46e5 100644 (file)
@@ -1,3 +1,17 @@
+2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
+
+        Reviewed by Simon.
+
+        * httpBody() can return 0 and other ports (cf/mac) check for this condition
+        * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
+        as well.
+        
+
+        WARNING: NO TEST CASES ADDED OR CHANGED
+
+        * platform/network/qt/QNetworkReplyHandler.cpp:
+        (WebCore::QNetworkReplyHandler::start):
+
 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
 
         Reviewed by Simon Hausmann <hausmann@webkit.org>.
index 1709966..faa841d 100644 (file)
@@ -188,7 +188,8 @@ void QNetworkReplyHandler::start()
             break;
         case QNetworkAccessManager::PostOperation: {
             Vector<char> bytes;
-            d->m_request.httpBody()->flatten(bytes);
+            if (d->m_request.httpBody())
+                d->m_request.httpBody()->flatten(bytes);
             m_reply = manager->post(m_request, QByteArray(bytes.data(), bytes.size()));
             break;
         }
@@ -198,7 +199,8 @@ void QNetworkReplyHandler::start()
         case QNetworkAccessManager::PutOperation: {
             // ### data?
             Vector<char> bytes;
-            d->m_request.httpBody()->flatten(bytes);
+            if (d->m_request.httpBody())
+                d->m_request.httpBody()->flatten(bytes);
             m_reply = manager->put(m_request, QByteArray(bytes.data(), bytes.size()));
             break;
         }