mirror of
https://github.com/moparisthebest/curl
synced 2025-01-10 21:48:10 -05:00
http: do not add a referrer header with empty value
Previously an empty 'Referer:' header was added to the HTTP request when passing `--referer ';auto'` or `--referer ''` on the command-line. This patch makes `--referer` work like `--header 'Referer:'` and will only add the header if it has a non-zero length value. Reviewed-by: Jay Satiro Closes #6610
This commit is contained in:
parent
cfff12a0b3
commit
cdb630655d
@ -1547,7 +1547,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
||||
}
|
||||
else
|
||||
config->autoreferer = FALSE;
|
||||
GetStr(&config->referer, nextarg);
|
||||
ptr = *nextarg ? nextarg : NULL;
|
||||
GetStr(&config->referer, ptr);
|
||||
}
|
||||
break;
|
||||
case 'E':
|
||||
|
Loading…
Reference in New Issue
Block a user