summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2017-12-28 14:04:59 +0100
committerMichael Brown2017-12-28 14:04:59 +0100
commit659c484efcb04c434cc562162eb0231be41cb816 (patch)
treec2e38fa867a9b7dd381cd77efbf395c584fe0a91
parent[http] Include error messages for 4xx and 5xx response codes (diff)
downloadipxe-659c484efcb04c434cc562162eb0231be41cb816.tar.gz
ipxe-659c484efcb04c434cc562162eb0231be41cb816.tar.xz
ipxe-659c484efcb04c434cc562162eb0231be41cb816.zip
[http] Report unsuccessful response status lines at DBGVL_LOG
The precise HTTP response status code is currently visible only at DBGLVL_EXTRA. Allow for easier debugging by reporting the whole status line at DBGLVL_LOG for any unsuccessful responses. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/net/tcp/httpcore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/tcp/httpcore.c b/src/net/tcp/httpcore.c
index 01143a1a..b3c9a00e 100644
--- a/src/net/tcp/httpcore.c
+++ b/src/net/tcp/httpcore.c
@@ -1163,6 +1163,8 @@ static int http_parse_status ( struct http_transaction *http, char *line ) {
response_rc = -EIO_OTHER;
}
http->response.rc = response_rc;
+ if ( response_rc )
+ DBGC ( http, "HTTP %p status %s\n", http, status );
return 0;
}