Made -D option work with -O and -J.
To achieve this, first new structure HeaderData is defined to hold necessary data to perform header-related work. Then tool_header_cb now receives HeaderData pointer as userdata. All header-related work (currently, dumping header and Content-Disposition inspection) are done in this callback function. HeaderData.outs->config is used to determine whether each work is done. Unit tests were also updated because after this change, curl code always sets CURLOPT_HEADERFUNCTION and CURLOPT_HEADERDATA. Tested with -O -J -D, -O -J -i and -O -J -D -i and all worked fine.
This commit is contained in:
committed by
Daniel Stenberg
parent
9c480490f7
commit
b061fed981
@@ -141,6 +141,8 @@ int main(int argc, char *argv[])
|
||||
CURLOPT_STDERR set to a objectpointer
|
||||
CURLOPT_DEBUGFUNCTION set to a functionpointer
|
||||
CURLOPT_DEBUGDATA set to a objectpointer
|
||||
CURLOPT_HEADERFUNCTION set to a functionpointer
|
||||
CURLOPT_HEADERDATA set to a objectpointer
|
||||
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user