* read static/server files directly into the outbuffer
[citadel.git] / webcit / downloads.c
index 600d89de0769cdf0c9196c02eb31293811725296..23bf5f801391e0b410fbd920e3005b4bae7e1ddd 100644 (file)
@@ -383,7 +383,6 @@ void display_mime_icon(void)
 
 void download_file(void)
 {
-       StrBuf *Buf;
        char buf[256];
        off_t bytes;
        char content_type[256];
@@ -406,10 +405,10 @@ void download_file(void)
                        extract_token(content_type, &buf[4], 3, '|', sizeof content_type);
                }
                output_headers(0, 0, 0, 0, 0, 0);
-               Buf = read_server_binary(bytes);
+               read_server_binary(WC->WBuf, bytes);
                serv_puts("CLOS");
                serv_getln(buf, sizeof buf);
-               http_transmit_thing(Buf, content_type, 0);
+               http_transmit_thing(content_type, 0);
                free(content);
        } else {
                hprintf("HTTP/1.1 404 %s\n", &buf[4]);