]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix generated HTTP message version labels
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 3 May 2014 10:35:31 +0000 (03:35 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 3 May 2014 10:35:31 +0000 (03:35 -0700)
Squid being conditionally compliant with RFC 2616 should be handling
HTTP/1.1 at all times unless another version was explicitly received.

This makes the default version number for all generated messages be 1.1
unless the alternative constructor is used or the numeric members are
explicitly set to other values. As a result all Squid generated messages
are labelled correctly as 1.1 by default now.

Fixes message version details sent to ICAP/eCAP on many error or
internally generated responses.

src/http/ProtocolVersion.h

index 9df8c24fed2ba619cef4deda8f5cf28f61f5969d..f8112d0c675a2ad420b3440e6a6fb67b3cb378a3 100644 (file)
@@ -8,12 +8,15 @@ namespace Http
 
 /**
  * Stores HTTP version label information.
- * For example HTTP/1.0
+ *
+ * Squid being conditionally compliant with RFC 2616
+ * on both client and server connections the default
+ * value is HTTP/1.1.
  */
 class ProtocolVersion : public AnyP::ProtocolVersion
 {
 public:
-    ProtocolVersion() : AnyP::ProtocolVersion(AnyP::PROTO_HTTP,0,0) {}
+    ProtocolVersion() : AnyP::ProtocolVersion(AnyP::PROTO_HTTP,1,1) {}
 
     ProtocolVersion(unsigned int aMajor, unsigned int aMinor) : AnyP::ProtocolVersion(AnyP::PROTO_HTTP,aMajor,aMinor) {}
 };