mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:53:32 +03:00
curl: show headers in bold
The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
This commit is contained in:
parent
6876ccf90b
commit
c1c27625c7
22 changed files with 81 additions and 55 deletions
|
|
@ -1722,24 +1722,22 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
}
|
||||
break;
|
||||
case 'i':
|
||||
config->include_headers = toggle; /* include the headers as well in the
|
||||
general output stream */
|
||||
config->show_headers = toggle; /* show the headers as well in the
|
||||
general output stream */
|
||||
break;
|
||||
case 'j':
|
||||
config->cookiesession = toggle;
|
||||
break;
|
||||
case 'I':
|
||||
/*
|
||||
* no_body will imply include_headers later on
|
||||
*/
|
||||
case 'I': /* --head */
|
||||
config->no_body = toggle;
|
||||
config->show_headers = toggle;
|
||||
if(SetHTTPrequest(config,
|
||||
(config->no_body)?HTTPREQ_HEAD:HTTPREQ_GET,
|
||||
&config->httpreq))
|
||||
return PARAM_BAD_USE;
|
||||
break;
|
||||
case 'J': /* --remote-header-name */
|
||||
if(config->include_headers) {
|
||||
if(config->show_headers) {
|
||||
warnf(global,
|
||||
"--include and --remote-header-name cannot be combined.\n");
|
||||
return PARAM_BAD_USE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue