]> code.citadel.org Git - citadel.git/commitdiff
* don't call begin/end ajax response twice
authorWilfried Göesgens <willi@citadel.org>
Tue, 26 Aug 2008 18:52:30 +0000 (18:52 +0000)
committerWilfried Göesgens <willi@citadel.org>
Tue, 26 Aug 2008 18:52:30 +0000 (18:52 +0000)
* removed duplicate headers from begin_ajax_response

webcit/webcit.c

index 33ade8044e206290a59bdcfa861149b453588d0e..ef9921f0abaeedce284fb34fb2ebb2b09ac01c64 100644 (file)
@@ -1190,14 +1190,14 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp,
  * Convenience functions to wrap around asynchronous ajax responses
  */
 void begin_ajax_response(void) {
+       struct wcsession *WCC = WC;
+
+       FlushStrBuf(WCC->HBuf);
         output_headers(0, 0, 0, 0, 0, 0);
 
         hprintf("Content-type: text/html; charset=UTF-8\r\n"
                 "Server: %s\r\n"
                 "Connection: close\r\n"
-                "Pragma: no-cache\r\n"
-                "Cache-Control: no-cache\r\n"
-               "Expires: -1\r\n"
                ,
                 PACKAGE_STRING);
         begin_burst();
@@ -1276,7 +1276,6 @@ void seconds_since_last_gexp(void)
 {
        char buf[256];
 
-       begin_ajax_response();
        if ( (time(NULL) - WC->last_pager_check) < 30) {
                wprintf("NO\n");
        }
@@ -1290,7 +1289,6 @@ void seconds_since_last_gexp(void)
                        wprintf("NO");
                }
        }
-       end_ajax_response();
 }
 
 /**