Dear list,
Webkit's QNRHandler.cpp does not set up
ContentLength and QNetworkRequest::DoNotBufferUploadDataAttribute
and eventually forces QNetworkReplyImpl to buffer up the data;
This is not fine for uploading large files, since eventually systems
it will run out of memory
Here is a small patch that works around it.
I will shortly report a bug at webkit.org
But just wanted to check on the qt list if the changes look good ?
--
Sriram Neelakandan
Author - Embedded Linux System Design And Development
(http://tinyurl.com/2doosu)
--- QNetworkReplyHandler.h.62228 2010-09-22 16:49:37.000000000 +0530
+++ QNetworkReplyHandler.h.new 2010-09-22 16:51:24.000000000 +0530
@@ -97,6 +97,7 @@ public:
~FormDataIODevice();
bool isSequential() const;
+ qint64 getFormDataSize() { return m_totalSize; }
protected:
qint64 readData(char*, qint64);
@@ -104,12 +105,16 @@ protected:
private:
void moveToNextElement();
+ qint64 computeSize();
void openFileForCurrentElement();
private:
Vector<FormDataElement> m_formElements;
QFile* m_currentFile;
qint64 m_currentDelta;
+ qint64 m_fileSize;
+ qint64 m_dataSize;
+ qint64 m_totalSize;
};
}
_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt