* fix HTTPS; this broke while migrating the request data to strbuf
[citadel.git] / webcit / webserver.c
index a550f49280dd0a5b46028806009e3bacd5a37d55..6f8105997d09603880aba78e7eaa95734c678998 100644 (file)
@@ -275,7 +275,8 @@ long end_burst(void)
 
 #ifdef HAVE_OPENSSL
        if (is_https) {
-               client_write_ssl(ptr, StrLength(WCC->HBuf));
+               client_write_ssl(WCC->HBuf);
+               client_write_ssl(WCC->WBuf);
                return (count);
        }
 #endif
@@ -289,7 +290,7 @@ long end_burst(void)
 #endif
        fdflags = fcntl(WC->http_sock, F_GETFL);
 
-        while (ptr < eptr) {
+       while (ptr < eptr) {
                 if ((fdflags & O_NONBLOCK) == O_NONBLOCK) {
                         FD_ZERO(&wset);
                         FD_SET(WCC->http_sock, &wset);
@@ -313,13 +314,6 @@ long end_burst(void)
        count = StrLength(WCC->WBuf);
        eptr = ptr + count;
 
-#ifdef HAVE_OPENSSL
-       if (is_https) {
-               client_write_ssl(ptr, StrLength(WCC->HBuf));
-               return (count);
-       }
-#endif
-
 #ifdef HTTP_TRACING
        
        write(2, "\033[34m", 5);