X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fdownloads.c;fp=webcit%2Fdownloads.c;h=8363982082be08cf2a1ea6a8742e9526d200704a;hp=ccb60390809c6c4a578d556782356cc6a96fe9fa;hb=c82a9b990b775ffd78b18925dbc00c7bb06e0a24;hpb=c5f1c8a65299a8df4c66d11440afc753580ed7f1 diff --git a/webcit/downloads.c b/webcit/downloads.c index ccb603908..836398208 100644 --- a/webcit/downloads.c +++ b/webcit/downloads.c @@ -270,12 +270,13 @@ void download_file(void) if (GetServerStatus(Buf, NULL) == 2) { StrBufCutLeft(Buf, 4); bytes = StrBufExtract_long(Buf, 0, '|'); - if (!force_download) { - StrBufExtract_token(ContentType, Buf, 3, '|'); - } + StrBufExtract_token(ContentType, Buf, 3, '|'); serv_read_binary(WCC->WBuf, bytes, Buf); serv_puts("CLOS"); StrBuf_ServGetln(Buf); + CheckGZipCompressionAllowed (SKEY(ContentType)); + if (force_download) + FlushStrBuf(ContentType); http_transmit_thing(ChrPtr(ContentType), 0); } else { StrBufCutLeft(Buf, 4); @@ -397,6 +398,7 @@ void output_image(void) /** Write it to the browser */ if (!IsEmptyStr(MimeType)) { + CheckGZipCompressionAllowed (MimeType, strlen(MimeType)); http_transmit_thing(MimeType, 0); FreeStrBuf(&Buf); return;