From 65eb40d1f599e88db1cf30118bcadc9d0201aa51 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 1 Oct 2011 22:10:13 +0300 Subject: [PATCH] Fix small bug in HttpConnection::read() --- src/webui/httpconnection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/webui/httpconnection.cpp b/src/webui/httpconnection.cpp index 2f6dc7495..81fb96f1f 100644 --- a/src/webui/httpconnection.cpp +++ b/src/webui/httpconnection.cpp @@ -83,6 +83,7 @@ void HttpConnection::read() { input.append(m_socket->readAll()); if(input.size() > 100000) { qDebug("Request too big"); + input.clear(); m_generator.setStatusLine(400, "Bad Request"); write(); return; @@ -99,6 +100,7 @@ void HttpConnection::read() { input.clear(); if(m_parser.isError()) { + qDebug() << Q_FUNC_INFO << "parsing error"; m_generator.setStatusLine(400, "Bad Request"); write(); } else { @@ -405,6 +407,7 @@ void HttpConnection::respondCommand(const QString& command) { return; } if(command == "upload") { + qDebug() << Q_FUNC_INFO << "upload"; // Get a unique filename // XXX: We need to use a QTemporaryFile pointer here // and it fails on Windows.