#ifndef HEADER_CURL_TOOL_CB_HDR_H1#define HEADER_CURL_TOOL_CB_HDR_H2/***************************************************************************3* _ _ ____ _4* Project ___| | | | _ \| |5* / __| | | | |_) | |6* | (__| |_| | _ <| |___7* \___|\___/|_| \_\_____|8*9* Copyright (C) Daniel Stenberg, <[email protected]>, et al.10*11* This software is licensed as described in the file COPYING, which12* you should have received as part of this distribution. The terms13* are also available at https://curl.se/docs/copyright.html.14*15* You may opt to use, copy, modify, merge, publish, distribute and/or sell16* copies of the Software, and permit persons to whom the Software is17* furnished to do so, under the terms of the COPYING file.18*19* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY20* KIND, either express or implied.21*22* SPDX-License-Identifier: curl23*24***************************************************************************/25#include "tool_setup.h"2627/*28* curl operates using a single HdrCbData struct variable, a29* pointer to this is passed as userdata pointer to tool_header_cb.30*31* 'outs' member is a pointer to the OutStruct variable used to keep32* track of information relative to curl's output writing.33*34* 'heads' member is a pointer to the OutStruct variable used to keep35* track of information relative to header response writing.36*37* 'honor_cd_filename' member is TRUE when tool_header_cb is allowed38* to honor Content-Disposition filename property and accordingly39* set 'outs' filename, otherwise FALSE;40*/4142struct HdrCbData {43struct OperationConfig *config;44struct OutStruct *outs;45struct OutStruct *heads;46struct OutStruct *etag_save;47struct curl_slist *headlist;48bool honor_cd_filename;49};5051int tool_write_headers(struct HdrCbData *hdrcbdata, FILE *stream);5253/*54** callback for CURLOPT_HEADERFUNCTION55*/5657size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata);5859#endif /* HEADER_CURL_TOOL_CB_HDR_H */606162