]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[http] Report unsuccessful response status lines at DBGVL_LOG
authorMichael Brown <mcb30@ipxe.org>
Thu, 28 Dec 2017 13:04:59 +0000 (13:04 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 28 Dec 2017 13:04:59 +0000 (13:04 +0000)
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>
src/net/tcp/httpcore.c

index 01143a1a7cf5fb53b7d2bcbef06ec28751985232..b3c9a00e6c126cc6312f22a749e4e9c06d9e0382 100644 (file)
@@ -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;
 }