From 14e6a7fce4eb4c0e4e71427b5da078ec28bd5ecc Mon Sep 17 00:00:00 2001 From: Alejandro Wainzinger Date: Tue, 30 Aug 2011 22:07:53 -0700 Subject: [PATCH] Return 404 if content is null. --- src/web/api_v1.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/web/api_v1.cpp b/src/web/api_v1.cpp index ae0dbcc93..d5d35044d 100644 --- a/src/web/api_v1.cpp +++ b/src/web/api_v1.cpp @@ -66,7 +66,11 @@ Api_v1::auth_2( QxtWebRequestEvent* event, QString arg ) { qDebug() << "AUTH_2 HTTP" << event->url.toString() << arg; if( event->content.isNull() ) + { + qDebug() << "Null content"; + send404( event ); return; + } QString params = QUrl::fromPercentEncoding( event->content->readAll() ); params = params.mid( params.indexOf( '?' ) );