]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.c
+ guess mimetype by template extension
[citadel.git] / webcit / webcit.c
index 49884f250599197380206c1bb49990eca435ca42..3904d043199465dc1ed46c2fee4b220423972526 100644 (file)
@@ -175,7 +175,7 @@ void output_headers(        int do_httpheaders,     /* 1 = output HTTP headers
                }
 
                if ( (WC->logged_in) && (!unset_cookies) ) {
-                       DoTemplate(HKEY("iconbar"), NULL, &NoCtx);
+                 //DoTemplate(HKEY("iconbar"), NULL, &NoCtx);
                        page_popup();
                }
 
@@ -368,11 +368,12 @@ void blank_page(void) {
  * A template has been requested
  */
 void url_do_template(void) {
+       const StrBuf *MimeType;
        const StrBuf *Tmpl = sbstr("template");
        begin_burst();
-       output_headers(1, 0, 0, 0, 1, 0);
-       DoTemplate(SKEY(Tmpl), NULL, &NoCtx);
-       end_burst();
+       output_headers(0, 0, 0, 0, 1, 0);
+       MimeType = DoTemplate(SKEY(Tmpl), NULL, &NoCtx);
+       http_transmit_thing(ChrPtr(MimeType), 0);
 }
 
 
@@ -1039,6 +1040,7 @@ SKIP_ALL_THIS_CRAP:
                WCC->upload_length = 0;
        }
        FreeStrBuf(&WCC->trailing_javascript);
+       WCC->http_host = NULL;
 }