]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/HttpRequest.h
3 * $Id: HttpRequest.h,v 1.16 2006/01/19 18:40:28 wessels Exp $
6 * SQUID Web Proxy Cache http://www.squid-cache.org/
7 * ----------------------------------------------------------
9 * Squid is the result of efforts by numerous individuals from
10 * the Internet community; see the CONTRIBUTORS file for full
11 * details. Many organizations have provided support for Squid's
12 * development; see the SPONSORS file for full details. Squid is
13 * Copyrighted (C) 2001 by the Regents of the University of
14 * California; see the COPYRIGHT file for full details. Squid
15 * incorporates software developed and/or copyrighted by other
16 * sources; see the CREDITS file for full details.
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
34 #ifndef SQUID_HTTPREQUEST_H
35 #define SQUID_HTTPREQUEST_H
38 #include "client_side.h"
39 #include "HierarchyLogEntry.h"
42 extern HttpRequest
*requestLink(HttpRequest
*);
43 extern void requestUnlink(HttpRequest
*);
44 extern int httpRequestHdrAllowed(const HttpHeaderEntry
* e
, String
* strConnection
);
45 extern int httpRequestHdrAllowedByName(http_hdr_type id
);
46 extern void httpRequestPack(void *obj
, Packer
*p
);
51 class HttpRequest
: public HttpMsg
55 MEMPROXY_CLASS(HttpRequest
);
57 HttpRequest(method_t aMethod
, protocol_t aProtocol
, const char *aUrlpath
);
62 void initXX(method_t aMethod
, protocol_t aProtocol
, const char *aUrlpath
);
67 int link_count
; /* free when zero */
71 char login
[MAX_LOGIN_SZ
];
72 char host
[SQUIDHOSTNAMELEN
+ 1];
73 auth_user_request_t
*auth_user_request
;
82 /* these in_addr's could probably be sockaddr_in's */
84 struct IN_ADDR client_addr
;
86 struct IN_ADDR my_addr
;
87 unsigned short my_port
;
88 unsigned short client_port
;
89 ConnStateData::Pointer body_connection
; /* used by clientReadBody() */
90 HierarchyLogEntry hier
;
92 char *peer_login
; /* Configured peer login:password */
93 time_t lastmod
; /* Used on refreshes */
94 const char *vary_headers
; /* Used when varying entities are detected. Changes how the store key is calculated */
95 char *peer_domain
; /* Configured peer forceddomain */
96 String tag
; /* Internal tag for this request */
97 String extacl_user
; /* User name returned by extacl lookup */
98 String extacl_passwd
; /* Password returned by extacl lookup */
99 String extacl_log
; /* String to be used for access.log purposes */
102 bool multipartRangeRequest() const;
103 bool parseFirstLine(const char *start
, const char *end
);
104 int parseHeader(const char *parse_start
);
105 virtual bool expectingBody(method_t unused
, ssize_t
&) const;
107 void swapOut(StoreEntry
* e
);
108 void pack(Packer
* p
);
109 static void httpRequestPack(void *obj
, Packer
*p
);
112 const char *packableURI(bool full_uri
) const;
115 virtual void packFirstLineInto(Packer
* p
, bool full_uri
) const;
116 virtual bool sanityCheckStartLine(MemBuf
*buf
, http_status
*error
);
117 virtual void hdrCacheInit();
121 MEMPROXY_CLASS_INLINE(HttpRequest
)
123 #endif /* SQUID_HTTPREQUEST_H */