Skip to content

Commit 57f41fc

Browse files
committed
Expand flags into ICAP
1 parent c471451 commit 57f41fc

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/adaptation/icap/ModXact.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ void Adaptation::Icap::ModXact::prepEchoing()
961961

962962
// write the virgin message into a memory buffer
963963
httpBuf.init();
964-
packHead(httpBuf, oldHead);
964+
packHead(httpBuf, oldHead, MaskSensitiveInfo::off);
965965

966966
// allocate the adapted message and copy metainfo
967967
Must(!adapted.header);
@@ -1615,15 +1615,15 @@ Adaptation::Icap::ModXact::encapsulateHead(MemBuf &icapBuf, const char *section,
16151615
}
16161616

16171617
// pack polished HTTP header
1618-
packHead(httpBuf, headClone.getRaw());
1618+
packHead(httpBuf, headClone.getRaw(), MaskSensitiveInfo::off);
16191619

16201620
// headClone unlocks and, hence, deletes the message we packed
16211621
}
16221622

16231623
void
1624-
Adaptation::Icap::ModXact::packHead(MemBuf &httpBuf, const Http::Message *head)
1624+
Adaptation::Icap::ModXact::packHead(MemBuf &httpBuf, const Http::Message *head, const MaskSensitiveInfo masking)
16251625
{
1626-
head->packInto(&httpBuf, true);
1626+
head->packInto(&httpBuf, true, masking);
16271627
}
16281628

16291629
// decides whether to offer a preview and calculates its size

src/adaptation/icap/ModXact.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class ModXact: public Xaction, public BodyProducer, public BodyConsumer
281281
template<class Part>
282282
bool parsePart(Part *part, const char *description);
283283

284-
void packHead(MemBuf &httpBuf, const Http::Message *head);
284+
void packHead(MemBuf &httpBuf, const Http::Message *head, const MaskSensitiveInfo);
285285
void encapsulateHead(MemBuf &icapBuf, const char *section, MemBuf &httpBuf, const Http::Message *head);
286286
bool gotEncapsulated(const char *section) const;
287287
/// whether ICAP response header indicates HTTP header presence

src/http/Message.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ Http::Message::persistent() const
250250
}
251251

252252
void
253-
Http::Message::packInto(Packable *p, bool full_uri) const
253+
Http::Message::packInto(Packable *p, bool full_uri, const MaskSensitiveInfo mask) const
254254
{
255255
packFirstLineInto(p, full_uri);
256-
header.packInto(p, MaskSensitiveInfo::off);
256+
header.packInto(p, mask);
257257
p->append("\r\n", 2);
258258
}
259259

src/http/Message.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Message : public RefCountable
5050

5151
virtual void reset() = 0; // will have body when http*Clean()s are gone
5252

53-
void packInto(Packable *, bool full_uri) const;
53+
void packInto(Packable *, bool full_uri, const MaskSensitiveInfo) const;
5454

5555
///< produce a message copy, except for a few connection-specific settings
5656
virtual Http::Message *clone() const = 0; // TODO rename: not a true copy?

src/tests/stub_libhttp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Http
3838
{
3939
Message::Message(const http_hdr_owner_type owner): header(owner) {STUB}
4040
Message::~Message() {STUB}
41-
void Message::packInto(Packable *, bool) const STUB
41+
void Message::packInto(Packable *, bool, const MaskSensitiveInfo) const STUB
4242
void Message::setContentLength(int64_t) STUB
4343
bool Message::persistent() const STUB_RETVAL(false)
4444
void Message::putCc(const HttpHdrCc &) STUB

0 commit comments

Comments
 (0)