2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID__ADAPTATION__MESSAGE_H
10 #define SQUID__ADAPTATION__MESSAGE_H
12 #include "base/RefCount.h"
16 typedef RefCount
<BodyPipe
> BodyPipePointer
;
21 // Manages the header and the body of an HTTP message being worked on.
22 // Adaptation transactions use this class for virgin and adapted HTTP messages.
23 // TODO: remove this class after adding refcounted message pointers and
24 // after making sure nobody abruptly clears the HttpMsg::body_pipe pointer.
29 typedef HttpMsg Header
;
32 Message(Header
*aHeader
);
36 void set(Header
*aHeader
);
38 static void ShortCircuit(Message
&src
, Message
&dest
);
41 // virgin or adapted message being worked on
42 Header
*header
; // parsed HTTP status/request line and headers
44 /// Copy of header->body_pipe, in case somebody moves the original.
45 /// \todo Find and fix the code that moves (if any) and remove this.
46 BodyPipePointer body_pipe
;
49 Message(const Message
&); // not implemented
50 Message
&operator =(const Message
&); // not implemented
53 } // namespace Adaptation;
55 // TODO: replace ICAPInOut with Adaptation::Message (adding one for "cause")
57 #endif /* SQUID__ADAPTATION__MESSAGE_H */