]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/HttpRequest.h
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / src / HttpRequest.h
index 74a9cea2addb36f58c2a71be7547d7bf4fa913f7..455bd74c8b750cead47d822d763d0c7145f43dde 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.h,v 1.32 2008/01/20 08:54:28 amosjeffries Exp $
+ * $Id$
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -58,13 +58,14 @@ public:
     virtual void reset();
 
     // use HTTPMSGLOCK() instead of calling this directly
-    virtual HttpRequest *_lock()
-    {
+    virtual HttpRequest *_lock() {
         return static_cast<HttpRequest*>(HttpMsg::_lock());
     };
 
     void initHTTP(const HttpRequestMethod& aMethod, protocol_t aProtocol, const char *aUrlpath);
 
+    virtual HttpRequest *clone() const;
+
     /* are responses to this request potentially cachable */
     bool cacheable() const;
 
@@ -72,14 +73,12 @@ public:
     /* HACK: These two methods are only inline to get around Makefile dependancies */
     /*      caused by HttpRequest being used in places it really shouldn't.        */
     /*      ideally they would be methods of URL instead. */
-    inline void SetHost(const char *src)
-    {
+    inline void SetHost(const char *src) {
         host_addr.SetEmpty();
         host_addr = src;
-        if( host_addr.IsAnyAddr() ) {
+        if ( host_addr.IsAnyAddr() ) {
             xstrncpy(host, src, SQUIDHOSTNAMELEN);
-        }
-        else {
+        } else {
             host_addr.ToHostname(host, SQUIDHOSTNAMELEN);
             debugs(23, 3, "HttpRequest::SetHost() given IP: " << host_addr);
         }
@@ -99,8 +98,14 @@ public:
 private:
     char host[SQUIDHOSTNAMELEN];
 
+    /***
+     * The client side connection data of pinned connections for the client side
+     * request related objects
+     */
+    ConnStateData *pinned_connection;
+
 public:
-    IPAddress host_addr;
+    IpAddress host_addr;
 
     AuthUserRequest *auth_user_request;
 
@@ -120,9 +125,13 @@ public:
 
     int max_forwards;
 
-    IPAddress client_addr;
+    IpAddress client_addr;
 
-    IPAddress my_addr;
+#if FOLLOW_X_FORWARDED_FOR
+    IpAddress indirect_client_addr;
+#endif /* FOLLOW_X_FORWARDED_FOR */
+
+    IpAddress my_addr;
 
     HierarchyLogEntry hier;
 
@@ -144,6 +153,10 @@ public:
 
     String extacl_log;         /* String to be used for access.log purposes */
 
+#if FOLLOW_X_FORWARDED_FOR
+    String x_forwarded_for_iterator; /* XXX a list of IP addresses */
+#endif /* FOLLOW_X_FORWARDED_FOR */
+
 public:
     bool multipartRangeRequest() const;
 
@@ -167,6 +180,18 @@ public:
 
     static HttpRequest * CreateFromUrl(char * url);
 
+    void setPinnedConnection(ConnStateData *conn) {
+        pinned_connection = cbdataReference(conn);
+    }
+
+    ConnStateData *pinnedConnection() {
+        return pinned_connection;
+    }
+
+    void releasePinnedConnection() {
+        cbdataReferenceDone(pinned_connection);
+    }
+
 private:
     const char *packableURI(bool full_uri) const;
 
@@ -177,8 +202,9 @@ protected:
 
     virtual void hdrCacheInit();
 
+    virtual bool inheritProperties(const HttpMsg *aMsg);
 };
 
-MEMPROXY_CLASS_INLINE(HttpRequest)
+MEMPROXY_CLASS_INLINE(HttpRequest)          /**DOCS_NOSEMI*/
 
 #endif /* SQUID_HTTPREQUEST_H */