projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7b47ab
)
* if we fail to compress, don't add gzip header and logwarn + backtrace
author
Wilfried Göesgens
<willi@citadel.org>
Tue, 21 Jul 2009 22:11:30 +0000
(22:11 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Tue, 21 Jul 2009 22:11:30 +0000
(22:11 +0000)
webcit/tcp_sockets.c
patch
|
blob
|
history
diff --git
a/webcit/tcp_sockets.c
b/webcit/tcp_sockets.c
index 15a1c1c6998200697a708adcc23c62fb3e68abfc..02515306be01435b324767c9e3ab87de76e2021f 100644
(file)
--- a/
webcit/tcp_sockets.c
+++ b/
webcit/tcp_sockets.c
@@
-602,9
+602,14
@@
long end_burst(void)
fd_set wset;
int fdflags;
- if (!DisableGzip && (WCC->Hdr->HR.gzip_ok)
&& CompressBuffer(WCC->WBuf)
)
+ if (!DisableGzip && (WCC->Hdr->HR.gzip_ok))
{
- hprintf("Content-encoding: gzip\r\n");
+ if (CompressBuffer(WCC->WBuf) > 0)
+ hprintf("Content-encoding: gzip\r\n");
+ else {
+ lprintf(CTDL_ALERT, "Compression failed: %d [%s] sending uncompressed\n", errno, strerror(errno));
+ wc_backtrace();
+ }
}
if (WCC->Hdr->HR.prohibit_caching)