]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/HttpRequest.h
HTTP 1.1: Forward OPTIONS requests properly
[thirdparty/squid.git] / src / HttpRequest.h
index 4d71f0e1238b2de1f7b3c9d6abda2028e2621065..d7981eefa3a78c421dbdb0b3a0fea46b24ac45a5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.h,v 1.33 2008/02/26 21:49:34 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.
@@ -40,8 +40,7 @@
 #include "HttpRequestMethod.h"
 
 /*  Http Request */
-extern int httpRequestHdrAllowed(const HttpHeaderEntry * e, String * strConnection);
-extern int httpRequestHdrAllowedByName(http_hdr_type id);
+//DEAD?: extern int httpRequestHdrAllowedByName(http_hdr_type id);
 extern void httpRequestPack(void *obj, Packer *p);
 
 
@@ -58,8 +57,7 @@ public:
     virtual void reset();
 
     // use HTTPMSGLOCK() instead of calling this directly
-    virtual HttpRequest *_lock()
-    {
+    virtual HttpRequest *_lock() {
         return static_cast<HttpRequest*>(HttpMsg::_lock());
     };
 
@@ -74,14 +72,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);
         }
@@ -100,15 +96,15 @@ public:
 
 private:
     char host[SQUIDHOSTNAMELEN];
-    
+
     /***
-     * The client side connection data of pinned connections for the client side 
-     * request related objects 
+     * 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;
 
@@ -126,15 +122,15 @@ public:
 
     int imslen;
 
-    int max_forwards;
+    int64_t max_forwards;
 
-    IPAddress client_addr;
+    IpAddress client_addr;
 
 #if FOLLOW_X_FORWARDED_FOR
-    IPAddress indirect_client_addr;
+    IpAddress indirect_client_addr;
 #endif /* FOLLOW_X_FORWARDED_FOR */
 
-    IPAddress my_addr;
+    IpAddress my_addr;
 
     HierarchyLogEntry hier;
 
@@ -182,17 +178,17 @@ public:
     static HttpRequest * CreateFromUrlAndMethod(char * url, const HttpRequestMethod& method);
 
     static HttpRequest * CreateFromUrl(char * url);
-    
+
     void setPinnedConnection(ConnStateData *conn) {
-       pinned_connection = cbdataReference(conn);
+        pinned_connection = cbdataReference(conn);
     }
 
     ConnStateData *pinnedConnection() {
-       return pinned_connection;
+        return pinned_connection;
     }
 
     void releasePinnedConnection() {
-       cbdataReferenceDone(pinned_connection);
+        cbdataReferenceDone(pinned_connection);
     }
 
 private:
@@ -204,10 +200,10 @@ protected:
     virtual bool sanityCheckStartLine(MemBuf *buf, http_status *error);
 
     virtual void hdrCacheInit();
-    
+
     virtual bool inheritProperties(const HttpMsg *aMsg);
 };
 
-MEMPROXY_CLASS_INLINE(HttpRequest)          /**DOCS_NOSEMI*/
+MEMPROXY_CLASS_INLINE(HttpRequest);
 
 #endif /* SQUID_HTTPREQUEST_H */