~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to proxy/http/HttpTransactHeaders.h

  • Committer: Package Import Robot
  • Author(s): Arno Töll
  • Date: 2014-01-29 03:01:12 UTC
  • mfrom: (1.2.3)
  • mto: (5.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20140129030112-z48a4g1pg5gctz7z
Tags: upstream-4.1.2
Import upstream version 4.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#define ink_time_t time_t
28
28
 
29
 
struct WUTSCode
30
 
{
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;
36
 
};
37
 
 
38
29
extern int nstrhex(char *d, unsigned int i);
39
30
 
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);
70
61
 
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);
79
64
 
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);
101
85
 
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);
152
136
inline bool
153
137
HttpTransactHeaders::is_request_proxy_authorized(HTTPHdr * incoming_hdr)
154
138
{
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?
158
141
  return true;
159
142
}