From b061fed981c97bef78679f193173ab55a4dce91e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 25 May 2012 17:33:28 +0900 Subject: 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. --- tests/data/test1403 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/data/test1403') diff --git a/tests/data/test1403 b/tests/data/test1403 index 3e4a03440..3ec7dd032 100644 --- a/tests/data/test1403 +++ b/tests/data/test1403 @@ -87,6 +87,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 */ -- cgit v1.2.3