27
27
#define ink_time_t time_t
31
SquidHitMissCode squid_hit_miss_code;
32
SquidLogCode squid_log_code[5];
33
SquidHierarchyCode squid_hier_code[5];
34
WUTSProxyId proxy_id[5];
35
WUTSProxyStatusCode proxy_status_code;
38
29
extern int nstrhex(char *d, unsigned int i);
40
31
class HttpTransactHeaders
68
59
static bool does_server_allow_response_to_be_stored(HTTPHdr * resp);
69
60
static bool downgrade_request(bool * origin_server_keep_alive, HTTPHdr * outgoing_request);
71
static bool get_wuts_code(HTTPHdr * hdr, WUTSCode * w);
72
static void set_wuts_codes(HTTPHdr * hdr, WUTSCode * code);
73
static void set_wuts_codes(HTTPHdr * hdr, SquidHitMissCode hit_miss_code,
74
SquidLogCode log_code, SquidHierarchyCode hier_code,
75
WUTSProxyId proxy_id, WUTSProxyStatusCode proxy_status_code);
76
static void generate_and_set_wuts_codes(HTTPHdr * header, char *via_string,
77
HttpTransact::SquidLogInfo * squid_codes,
78
int wuts_id, bool set_codes_in_hdr, bool log_spider_codes = false);
62
static void generate_and_set_squid_codes(HTTPHdr * header, char *via_string,
63
HttpTransact::SquidLogInfo * squid_codes);
80
static void convert_wuts_code_to_normal_reason(HTTPHdr * header);
81
65
static void handle_conditional_headers(HttpTransact::CacheLookupInfo * cache_info, HTTPHdr * header);
82
66
static void insert_warning_header(HttpConfigParams *http_config_param,
83
67
HTTPHdr *header, HTTPWarningCode code,
99
83
static void _process_xxx_connection_field_in_outgoing_header(const char *wks_field_name, int wks_field_name_len,
100
84
HTTPHdr * base, HTTPHdr * header);
102
static void remove_conditional_headers(HTTPHdr * base, HTTPHdr * outgoing);
86
static void remove_conditional_headers(HTTPHdr * outgoing);
103
87
static void remove_host_name_from_url(HTTPHdr * outgoing_request);
104
88
static void add_global_user_agent_header_to_request(HttpConfigParams *http_config_param, HTTPHdr * header);
105
89
static void add_server_header_to_response(OverridableHttpConfigParams *http_txn_conf, HTTPHdr * header);
153
137
HttpTransactHeaders::is_request_proxy_authorized(HTTPHdr * incoming_hdr)
155
NOWARN_UNUSED(incoming_hdr);
156
ink_debug_assert(incoming_hdr);
139
ink_assert(incoming_hdr);
157
140
// TODO: What do we need to do here?