mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Fix small bug in HttpConnection::read()
This commit is contained in:
parent
9cf37f5364
commit
65eb40d1f5
@ -83,6 +83,7 @@ void HttpConnection::read() {
|
|||||||
input.append(m_socket->readAll());
|
input.append(m_socket->readAll());
|
||||||
if(input.size() > 100000) {
|
if(input.size() > 100000) {
|
||||||
qDebug("Request too big");
|
qDebug("Request too big");
|
||||||
|
input.clear();
|
||||||
m_generator.setStatusLine(400, "Bad Request");
|
m_generator.setStatusLine(400, "Bad Request");
|
||||||
write();
|
write();
|
||||||
return;
|
return;
|
||||||
@ -99,6 +100,7 @@ void HttpConnection::read() {
|
|||||||
input.clear();
|
input.clear();
|
||||||
|
|
||||||
if(m_parser.isError()) {
|
if(m_parser.isError()) {
|
||||||
|
qDebug() << Q_FUNC_INFO << "parsing error";
|
||||||
m_generator.setStatusLine(400, "Bad Request");
|
m_generator.setStatusLine(400, "Bad Request");
|
||||||
write();
|
write();
|
||||||
} else {
|
} else {
|
||||||
@ -405,6 +407,7 @@ void HttpConnection::respondCommand(const QString& command) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(command == "upload") {
|
if(command == "upload") {
|
||||||
|
qDebug() << Q_FUNC_INFO << "upload";
|
||||||
// Get a unique filename
|
// Get a unique filename
|
||||||
// XXX: We need to use a QTemporaryFile pointer here
|
// XXX: We need to use a QTemporaryFile pointer here
|
||||||
// and it fails on Windows.
|
// and it fails on Windows.
|
||||||
|
Loading…
Reference in New Issue
Block a user