projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd92e34
)
* OverrideRequest(): for some reason Hdr->HR.ReqLine can be NULL here, we need to...
author
Wilfried Göesgens
<willi@citadel.org>
Thu, 6 May 2010 18:40:08 +0000
(18:40 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Thu, 6 May 2010 18:40:08 +0000
(18:40 +0000)
webcit/context_loop.c
patch
|
blob
|
history
diff --git
a/webcit/context_loop.c
b/webcit/context_loop.c
index 34233ef417f13adc96e0e930aef6da788823f0ae..1525e91a574d1476e45661e53c09c99a540ffc52 100644
(file)
--- 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);