← Commit list

3652127e81

Jay Satiro
Jay Satiro
2026-01-12
SUCCESS Duration: 340s

Subject

tool_cb_hdr: suppress header output when --out-null

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/tool_cb_hdr.c+3 -3
@@ -275,9 +275,9 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
else if(ptr[0] == '\r' || ptr[0] == '\n')
per->was_last_header_empty = TRUE;
}
- if(hdrcbdata->config->show_headers &&
- (scheme == proto_http || scheme == proto_https ||
- scheme == proto_rtsp || scheme == proto_file)) {
+ if(hdrcbdata->config->show_headers && !outs->out_null &&
+ (scheme == proto_http || scheme == proto_https ||
+ scheme == proto_rtsp || scheme == proto_file)) {
/* bold headers only for selected protocols */
char *value = NULL;
tests/data/test756+0 -7
@@ -61,13 +61,6 @@ Accept: */*
</protocol>
<stdout>
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Response: 1
-Content-Type: text/html
-Content-Length: 8
-
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake