From 8418a9aa5f0a111696e35c74ad5453c4734ecbc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 6 May 2010 18:40:08 +0000 Subject: [PATCH] * OverrideRequest(): for some reason Hdr->HR.ReqLine can be NULL here, we need to take care of that. --- webcit/context_loop.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 34233ef41..1525e91a5 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -444,8 +444,13 @@ void OverrideRequest(ParsedHttpHdrs *Hdr, const char *Line, long len) { StrBuf *Buf = NewStrBuf(); - FlushStrBuf(Hdr->HR.ReqLine); - StrBufPlain(Hdr->HR.ReqLine, Line, len); + if (Hdr->HR.ReqLine != NULL) { + FlushStrBuf(Hdr->HR.ReqLine); + StrBufPlain(Hdr->HR.ReqLine, Line, len); + } + else { + Hdr->HR.ReqLine = NewStrBufPlain(Line, len); + } ReadHttpSubject(Hdr, Hdr->HR.ReqLine, Buf); FreeStrBuf(&Buf); -- 2.30.2