]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/http.h
Initialize all HttpStateData data members (#1029)
[thirdparty/squid.git] / src / http.h
index e70cd7e037f0836d34d0ea6ad1ff69fc6ab232a0..c4161211f86ed68ec4d33a596c0f59af6d82601a 100644 (file)
@@ -61,14 +61,13 @@ public:
     // Checks whether the response is cacheable/shareable.
     ReuseDecision::Answers reusableReply(ReuseDecision &decision);
 
-    CachePeer *_peer;       /* CachePeer request made to */
-    int eof;            /* reached end-of-object? */
-    int lastChunk;      /* reached last chunk of a chunk-encoded reply */
+    CachePeer *_peer = nullptr;       /* CachePeer request made to */
+    int eof = 0;            /* reached end-of-object? */
+    int lastChunk = 0;      /* reached last chunk of a chunk-encoded reply */
     Http::StateFlags flags;
-    size_t read_sz;
     SBuf inBuf;                ///< I/O buffer for receiving server responses
-    bool ignoreCacheControl;
-    bool surrogateNoStore;
+    bool ignoreCacheControl = false;
+    bool surrogateNoStore = false;
 
     /// Upgrade header value sent to the origin server or cache peer.
     String *upgradeHeaderOut = nullptr;
@@ -147,16 +146,16 @@ private:
 
     /// Parser being used at present to parse the HTTP/ICY server response.
     Http1::ResponseParserPointer hp;
-    Http1::TeChunkedParser *httpChunkDecoder;
+    Http1::TeChunkedParser *httpChunkDecoder = nullptr;
 
     /// amount of message payload/body received so far.
-    int64_t payloadSeen;
+    int64_t payloadSeen = 0;
     /// positive when we read more than we wanted
-    int64_t payloadTruncated;
+    int64_t payloadTruncated = 0;
 
     /// Whether we received a Date header older than that of a matching
     /// cached response.
-    bool sawDateGoBack;
+    bool sawDateGoBack = false;
 };
 
 std::ostream &operator <<(std::ostream &os, const HttpStateData::ReuseDecision &d);