aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/curl/curljsonrequest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp
index 702de22f46..805852ea0a 100644
--- a/backends/networking/curl/curljsonrequest.cpp
+++ b/backends/networking/curl/curljsonrequest.cpp
@@ -70,10 +70,12 @@ bool CurlJsonRequest::handle() {
if (_stream->eos()) {
if (_stream->httpResponseCode() != 200)
- warning("HTTP response code is not 200 OK");
+ warning("HTTP response code is not 200 OK (it's %d)", _stream->httpResponseCode());
if (_callback) {
- char *contents = getPreparedContents();
+ char *contents = getPreparedContents();
+ if (_stream->httpResponseCode() != 200)
+ debug("%s", contents);
Common::JSONValue *json = Common::JSON::parse(contents);
(*_callback)(json); //potential memory leak, free it in your callbacks!
}