]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Renamed HTTP_VIOLATIONS define to standard USE_HTTP_VIOLATIONS
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 14 May 2010 09:47:03 +0000 (11:47 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 14 May 2010 09:47:03 +0000 (11:47 +0200)
13 files changed:
configure.in
src/cache_cf.cc
src/cf.data.pre
src/cf_gen_defines
src/client_side.cc
src/client_side_reply.cc
src/client_side_request.cc
src/errorpage.cc
src/globals.h
src/http.cc
src/refresh.cc
src/store.cc
src/structs.h

index 220f85128bfadf5ae690f27aa8ab2c3c1841a397..e5ff0e86a8775525ccc7a669169cf297f634dba7 100644 (file)
@@ -1267,7 +1267,7 @@ AC_ARG_ENABLE(http-violations,
   SQUID_YESNO([$enableval],
          [unrecognized argument to --disable-http-violations: $enableval])
 ])
-SQUID_DEFINE_BOOL(HTTP_VIOLATIONS, ${enable_http_violations:=yes},
+SQUID_DEFINE_BOOL(USE_HTTP_VIOLATIONS, ${enable_http_violations:=yes},
   [Define to enable code which volates the HTTP standard specification])
 AC_MSG_NOTICE([HTTP violations support enabled: $enable_http_violations])
 
index 2f8a1c1f1d53be649bb0d43414ed47e36413a23e..888bf9c5ea2b03afdfba799cb915c1af0892ef13 100644 (file)
@@ -142,7 +142,7 @@ static size_t parseBytesUnits(const char *unit);
 static void free_all(void);
 void requirePathnameExists(const char *name, const char *path);
 static OBJH dump_config;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 static void dump_http_header_access(StoreEntry * entry, const char *name, header_mangler header[]);
 static void parse_http_header_access(header_mangler header[]);
 static void free_http_header_access(header_mangler header[]);
@@ -550,7 +550,7 @@ configDoConfigure(void)
     if (Config.errorDirectory)
         requirePathnameExists("Error Directory", Config.errorDirectory);
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
     {
         const refresh_t *R;
@@ -636,7 +636,7 @@ configDoConfigure(void)
 
     }
 #endif
-#if !HTTP_VIOLATIONS
+#if !USE_HTTP_VIOLATIONS
     Config.onoff.via = 1;
 #else
 
@@ -1278,7 +1278,7 @@ parse_delay_pool_access(DelayConfig * cfg)
 
 #endif
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 static void
 dump_http_header_access(StoreEntry * entry, const char *name, header_mangler header[])
 {
@@ -2254,7 +2254,7 @@ dump_refreshpattern(StoreEntry * entry, const char *name, refresh_t * head)
         if (head->flags.refresh_ims)
             storeAppendPrintf(entry, " refresh-ims");
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         if (head->flags.override_expire)
             storeAppendPrintf(entry, " override-expire");
@@ -2300,7 +2300,7 @@ parse_refreshpattern(refresh_t ** head)
     double pct = 0.0;
     time_t max = 0;
     int refresh_ims = 0;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
     int override_expire = 0;
     int override_lastmod = 0;
@@ -2355,7 +2355,7 @@ parse_refreshpattern(refresh_t ** head)
     while ((token = strtok(NULL, w_space)) != NULL) {
         if (!strcmp(token, "refresh-ims")) {
             refresh_ims = 1;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         } else if (!strcmp(token, "override-expire"))
             override_expire = 1;
@@ -2408,7 +2408,7 @@ parse_refreshpattern(refresh_t ** head)
     if (refresh_ims)
         t->flags.refresh_ims = 1;
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
     if (override_expire)
         t->flags.override_expire = 1;
@@ -2461,7 +2461,7 @@ free_refreshpattern(refresh_t ** head)
         safe_free(t);
     }
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
     refresh_nocache_hack = 0;
 
 #endif
@@ -3082,7 +3082,7 @@ parse_http_port_option(http_port_list * s, char *token)
         }
         s->allow_direct = 1;
     } else if (strcmp(token, "ignore-cc") == 0) {
-#if !HTTP_VIOLATIONS
+#if !USE_HTTP_VIOLATIONS
         if (!s->accel) {
             debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: ignore-cc option requires Scceleration mode flag.");
             self_destruct();
index 32b93edba5bc68cb16d15fcdb340afa20ff66a6d..f0828108b703cefd5ceff2deff1192106715d009 100644 (file)
@@ -3587,7 +3587,7 @@ DOC_START
 DOC_END
 
 NAME: negative_ttl
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 COMMENT: time-units
 TYPE: time_t
 LOC: Config.negativeTtl
@@ -3780,7 +3780,7 @@ DOC_START
 DOC_END
 
 NAME: broken_posts
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 TYPE: acl_access
 DEFAULT: none
 LOC: Config.accessList.brokenPosts
@@ -3820,7 +3820,7 @@ DOC_START
 DOC_END
 
 NAME: via
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 COMMENT: on|off
 TYPE: onoff
 DEFAULT: on
@@ -3887,7 +3887,7 @@ DOC_START
 DOC_END
 
 NAME: request_header_access
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 TYPE: http_header_access[]
 LOC: Config.request_header_access
 DEFAULT: none
@@ -3960,7 +3960,7 @@ DOC_START
 DOC_END
 
 NAME: reply_header_access
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 TYPE: http_header_access[]
 LOC: Config.reply_header_access
 DEFAULT: none
@@ -4036,7 +4036,7 @@ DOC_START
 DOC_END
 
 NAME: header_replace
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 TYPE: http_header_replace[]
 LOC: Config.request_header_access
 DEFAULT: none
@@ -4075,7 +4075,7 @@ DOC_END
 
 NAME: ignore_expect_100
 COMMENT: on|off
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 TYPE: onoff
 LOC: Config.onoff.ignore_expect_100
 DEFAULT: off
@@ -6739,7 +6739,7 @@ DOC_START
 DOC_END
 
 NAME: reload_into_ims
-IFDEF: HTTP_VIOLATIONS
+IFDEF: USE_HTTP_VIOLATIONS
 COMMENT: on|off
 TYPE: onoff
 DEFAULT: off
index fc6a9d43823c80cf57db815de64e78ed22981837..c8ca74772cdd1b2177ebb7562f164812cd5f3330 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
        define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for"
        define["FOLLOW_X_FORWARDED_FOR&&DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools"
        define["FOLLOW_X_FORWARDED_FOR&&ICAP_CLIENT"]="--enable-follow-x-forwarded-for and --enable-icap-client"
-       define["HTTP_VIOLATIONS"]="--enable-http-violations"
+       define["USE_HTTP_VIOLATIONS"]="--enable-http-violations"
        define["ICAP_CLIENT"]="--enable-icap-client"
        define["SQUID_SNMP"]="--enable-snmp"
        define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client"
index 6059e220088f2a44114b450158c295c4cfebb7d0..e6927eeff58b8677cd7d07cfa96cbc533697bcfb 100644 (file)
@@ -2501,7 +2501,7 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c
 
     if (request->header.has(HDR_EXPECT)) {
         int ignore = 0;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
         if (Config.onoff.ignore_expect_100) {
             String expect = request->header.getList(HDR_EXPECT);
             if (expect.caseCmp("100-continue") == 0)
index 6962571c1318c5edd52d2b3ee1352fd3214fbda4..1608569f15979a299aca2ffe271668ca61ec0201 100644 (file)
@@ -509,7 +509,7 @@ clientReplyContext::cacheHit(StoreIOBuffer result)
     }
 
     if (e->checkNegativeHit()
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
             && !r->flags.nocache_hack
 #endif
        ) {
@@ -1502,7 +1502,7 @@ clientReplyContext::identifyFoundObject(StoreEntry *newEntry)
 
     }
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
     else if (r->flags.nocache_hack) {
 
@@ -1518,7 +1518,7 @@ clientReplyContext::identifyFoundObject(StoreEntry *newEntry)
 
     }
 
-#endif /* HTTP_VIOLATIONS */
+#endif /* USE_HTTP_VIOLATIONS */
 #if USE_CACHE_DIGESTS
 
     lookup_type = http->storeEntry() ? "HIT" : "MISS";
index b2a3d27a8577bb9b46f7c3903f1f4e08b74f16cd..a3f9b4a40c3df346089205410b8348df1b76c55c 100644 (file)
@@ -874,7 +874,7 @@ clientInterpretRequestHeaders(ClientHttpRequest * http)
     }
 
     if (no_cache) {
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         if (Config.onoff.reload_into_ims)
             request->flags.nocache_hack = 1;
index 9df2866897703b71395741bc2c871c3a0b3fafbb..1e2d5228b6bef3603294bfc159011ca20896467e 100644 (file)
@@ -995,7 +995,7 @@ ErrorState::BuildContent()
             bool invalid_byte = false;
             while (pos < hdr.size() && hdr[pos] != ';' && hdr[pos] != ',' && !xisspace(hdr[pos]) && dt < (dir+256) ) {
                 if (!invalid_byte) {
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
                     // if accepting violations we may as well accept some broken browsers
                     //  which may send us the right code, wrong ISO formatting.
                     if (hdr[pos] == '_')
index 7eea3cb10dad193b74c95cc30f286a7e286d62b0..482695071ff27f8cdeab57ac0f05b719aaf97c41 100644 (file)
@@ -132,7 +132,7 @@ extern "C" {
     extern const char *StoreDigestMimeStr;     /* "application/cache-digest" */
 
     extern const char *MultipartMsgBoundaryStr;        /* "Unique-Squid-Separator" */
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
     extern int refresh_nocache_hack;   /* 0 */
 #endif
index d10bea993f22a8e731073b989f4f477db6cd74da..9379b49b3d9db30a70d8cca7446f880e30e30353 100644 (file)
@@ -350,13 +350,13 @@ HttpStateData::cacheableReply()
     HttpHeader const *hdr = &rep->header;
     const int cc_mask = (rep->cache_control) ? rep->cache_control->mask : 0;
     const char *v;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
     const refresh_t *R = NULL;
 
     /* This strange looking define first looks up the refresh pattern
      * and then checks if the specified flag is set. The main purpose
-     * of this is to simplify the refresh pattern lookup and HTTP_VIOLATIONS
+     * of this is to simplify the refresh pattern lookup and USE_HTTP_VIOLATIONS
      * condition
      */
 #define REFRESH_OVERRIDE(flag) \
@@ -882,7 +882,7 @@ HttpStateData::haveParsedReplyHeaders()
 
     case -1:
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
         if (Config.negativeTtl > 0)
             entry->cacheNegatively();
         else
@@ -2084,7 +2084,7 @@ HttpStateData::doneSendingRequestBody()
 {
     debugs(11,5, HERE << "doneSendingRequestBody: FD " << fd);
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
     if (Config.accessList.brokenPosts) {
         ACLFilledChecklist ch(Config.accessList.brokenPosts, request, NULL);
         if (!ch.fastCheck()) {
@@ -2103,7 +2103,7 @@ HttpStateData::doneSendingRequestBody()
         return;
     }
     debugs(11, 5, "doneSendingRequestBody: No brokenPosts list");
-#endif /* HTTP_VIOLATIONS */
+#endif /* USE_HTTP_VIOLATIONS */
 
     CommIoCbParams io(NULL);
     io.fd=fd;
index 7891c34ee8276b1d196219c18959678e728f4ddc..5f5467251510489ea9a2d9c92ca48e233ca2f63b 100644 (file)
@@ -272,7 +272,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta)
     debugs(22, 3, "\tentry->timestamp:\t" << mkrfc1123(entry->timestamp));
 
     if (EBIT_TEST(entry->flags, ENTRY_REVALIDATE) && staleness > -1
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
             && !R->flags.ignore_must_revalidate
 #endif
        ) {
@@ -290,7 +290,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta)
             return STALE_FORCED_RELOAD;
         }
 
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         if (!request->flags.nocache_hack) {
             (void) 0;
@@ -311,7 +311,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta)
 #endif
         if (NULL != cc) {
             if (cc->max_age > -1) {
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
                 if (R->flags.ignore_reload && cc->max_age == 0) {} else
 #endif
                 {
@@ -368,7 +368,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta)
      * the override options kicks in.
      */
     if (sf.expires) {
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         if (R->flags.override_expire && age < R->min) {
             debugs(22, 3, "refreshCheck: NO: age < min && override-expire");
@@ -383,7 +383,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta)
         return STALE_MAX_RULE;
 
     if (sf.lmfactor) {
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         if (R->flags.override_lastmod && age < R->min) {
             debugs(22, 3, "refreshCheck: NO: age < min && override-lastmod");
index 5fcea64c76240c63f4669eba9f4e6fe8f7526042..ab8d7fd275a4d96b5dcfc9b5b2a8d749e84ffd94 100644 (file)
@@ -1452,7 +1452,7 @@ void
 StoreEntry::negativeCache()
 {
     if (expires == 0)
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
         expires = squid_curtime + Config.negativeTtl;
 #else
         expires = squid_curtime;
index 4217ff81d35be49b05d489a57e021c32562ac608..12f160fa6931ee06201fc64993800b6f9d13c796 100644 (file)
@@ -153,7 +153,7 @@ struct SquidConfig {
     int64_t readAheadGap;
     RemovalPolicySettings *replPolicy;
     RemovalPolicySettings *memPolicy;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
     time_t negativeTtl;
 #endif
     time_t negativeDnsTtl;
@@ -390,7 +390,7 @@ struct SquidConfig {
         int test_reachability;
         int half_closed_clients;
         int refresh_all_ims;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
 
         int reload_into_ims;
         int ignore_expect_100;
@@ -457,7 +457,7 @@ struct SquidConfig {
 
         acl_access *snmp;
 #endif
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
         acl_access *brokenPosts;
 #endif
         acl_access *redirector;
@@ -1000,7 +1000,7 @@ struct _iostats {
 
 struct request_flags {
     request_flags(): range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),accelerated(0),ignore_cc(0),intercepted(0),spoof_client_ip(0),internal(0),internalclient(0),must_keepalive(0),destinationIPLookedUp_(0) {
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
         nocache_hack = 0;
 #endif
 #if FOLLOW_X_FORWARDED_FOR
@@ -1021,7 +1021,7 @@ unsigned int proxying:
     unsigned int refresh:1;
     unsigned int redirected:1;
     unsigned int need_validation:1;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
     unsigned int nocache_hack:1;       /* for changing/ignoring no-cache requests */
 #endif
     unsigned int accelerated:1;
@@ -1082,7 +1082,7 @@ struct _refresh_t {
     struct {
         unsigned int icase:1;
         unsigned int refresh_ims:1;
-#if HTTP_VIOLATIONS
+#if USE_HTTP_VIOLATIONS
         unsigned int override_expire:1;
         unsigned int override_lastmod:1;
         unsigned int reload_into_ims:1;