From a884ffe43027e837e9fef41626c34e7f00bb2df1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 9 Jun 2012 05:42:39 +0200 Subject: Fixes allowing 26 more test cases in 1334 to 1393 range to succeed --- src/tool_cb_hdr.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'src/tool_cb_hdr.h') diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h index 0300c0068..bd5043139 100644 --- a/src/tool_cb_hdr.h +++ b/src/tool_cb_hdr.h @@ -23,15 +23,26 @@ ***************************************************************************/ #include "tool_setup.h" -/* Structure to pass as userdata in tool_header_cb */ -typedef struct { - /* getout object pointer currently processing */ - struct getout *urlnode; - /* output stream */ +/* + * curl operates using a single HdrCbData struct variable, a + * pointer to this is passed as userdata pointer to tool_header_cb. + * + * 'outs' member is a pointer to the OutStruct variable used to keep + * track of information relative to curl's output writing. + * + * 'heads' member is a pointer to the OutStruct variable used to keep + * track of information relative to header response writing. + * + * 'honor_cd_filename' member is TRUE when tool_header_cb is allowed + * to honor Content-Disposition filename property and accordingly + * set 'outs' filename, otherwise FALSE; + */ + +struct HdrCbData { struct OutStruct *outs; - /* header output stream */ struct OutStruct *heads; -} HeaderData; + bool honor_cd_filename; +}; /* ** callback for CURLOPT_HEADERFUNCTION -- cgit v1.2.3