]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Sat, 27 Oct 2012 00:13:19 +0000 (18:13 -0600)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Sat, 27 Oct 2012 00:13:19 +0000 (18:13 -0600)
src/HttpRequest.cc
src/HttpRequestMethod.cc
src/Notes.h
src/adaptation/ecap/XactionRep.cc
src/format/Format.cc
src/http/MethodType.h

index a8a95803f8ae074e06066e7943e53a9dc5845f5a..f0003069075219e45cad239bd071eaa862effb36 100644 (file)
@@ -585,8 +585,7 @@ HttpRequest::maybeCacheable()
     if (!flags.hostVerified && (flags.intercepted || flags.spoofClientIp))
         return false;
 
-    switch(protocol)
-    {
+    switch (protocol) {
     case AnyP::PROTO_HTTP:
         if (!method.respMaybeCacheable())
             return false;
@@ -603,7 +602,7 @@ HttpRequest::maybeCacheable()
     case AnyP::PROTO_CACHE_OBJECT:
         return false;
 
-    //case AnyP::PROTO_FTP:
+        //case AnyP::PROTO_FTP:
     default:
         break;
     }
index 2f69b9379e34fd0c343a9461a065fb604cd17aa7..4fe6fc960bcc0194c8ed20d3cbcb309da573df01 100644 (file)
@@ -78,11 +78,10 @@ HttpRequestMethod::isHttpSafe() const
 
     // NOTE:
     // All known RFCs which register methods are listed in comments.
-    // if there is one not listed which defines methods, it needs 
+    // if there is one not listed which defines methods, it needs
     // checking and adding. If only to say it is known to define none.
 
-    switch(theMethod)
-    {
+    switch (theMethod) {
         // RFC 2068 - none
 
         // RFC 2616 section 9.1.1
@@ -121,11 +120,10 @@ HttpRequestMethod::isIdempotent() const
 
     // NOTE:
     // All known RFCs which register methods are listed in comments.
-    // if there is one not listed which defines methods, it needs 
+    // if there is one not listed which defines methods, it needs
     // checking and adding. If only to say it is known to define none.
 
-    switch(theMethod)
-    {
+    switch (theMethod) {
         // RFC 2068 - TODO check LINK/UNLINK definition
 
         // RFC 2616 section 9.1.2
@@ -166,8 +164,7 @@ HttpRequestMethod::respMaybeCacheable() const
 {
     // Only a few methods are defined as cacheable.
     // All other methods from the below RFC are "MUST NOT cache"
-    switch(theMethod)
-    {
+    switch (theMethod) {
         // RFC 2616 section 9
     case Http::METHOD_GET:
     case Http::METHOD_HEAD:
index 5a78b8f168a79c3ae0ddcff8a0a20f954a24f60e..fab5922d86c19751241e5ee293af03d1ec8dec87 100644 (file)
@@ -9,7 +9,6 @@
 #include <string>
 #endif
 
-
 class HttpRequest;
 class HttpReply;
 
@@ -57,7 +56,8 @@ class ConfigParser;
 /**
  * Used to store a notes list.
  */
-class Notes {
+class Notes
+{
 public:
     typedef Vector<Note::Pointer> NotesList;
     typedef NotesList::iterator iterator; ///< iterates over the notes list
@@ -95,7 +95,8 @@ private:
     Note::Pointer add(const String &noteKey);
 };
 
-class NotePairs : public HttpHeader {
+class NotePairs : public HttpHeader
+{
 public:
     NotePairs() : HttpHeader(hoNote) {}
 };
index 028a642404c97ed787b848dc2339fe88d5c68ab4..01c7aaeae9ef8734d032cd9e3a32296b34716686 100644 (file)
@@ -219,7 +219,7 @@ Adaptation::Ecap::XactionRep::start()
         makingVb = opNever; // there is nothing to deliver
 
     HttpRequest *request = dynamic_cast<HttpRequest*> (theCauseRep ?
-                                 theCauseRep->raw().header : theVirginRep.raw().header);
+                           theCauseRep->raw().header : theVirginRep.raw().header);
     Must(request);
 
     HttpReply *reply = dynamic_cast<HttpReply*>(theVirginRep.raw().header);
index d98bc76b681a55d38654356d64dc0fd079a41896..d07bfc96bd87d0e0150677e2fa89c4988787fda2 100644 (file)
@@ -1042,7 +1042,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 #endif
         case LFT_NOTE:
             if (fmt->data.string) {
-                sb = al->notes.getByName(fmt->data.string);                
+                sb = al->notes.getByName(fmt->data.string);
                 out = sb.termedBuf();
                 quote = 1;
             } else {
index b66c9fad5ef836694a3bcb792aa4d45a66fbe6a7..ce649569054fa8357b6b5bde7bf6f8cfbc56c5f0 100644 (file)
@@ -4,7 +4,7 @@
 namespace Http
 {
 
-// see IANA registry: 
+// see IANA registry:
 // also: https://datatracker.ietf.org/doc/draft-ietf-httpbis-method-registrations
 typedef enum _method_t {
     METHOD_NONE = 0,