/static/webcit.css was being grabbed by the code
authorArt Cancro <ajc@citadel.org>
Mon, 22 Sep 2008 14:06:54 +0000 (14:06 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 22 Sep 2008 14:06:54 +0000 (14:06 +0000)
that checks for '/webcit' and therefore this file was failing
to load.  Fixed it by checking for '/webcit/' instead.

webcit/context_loop.c
webcit/crypto.c
webcit/webcit.c

index 932bb7c27b2110d553c864cb0a5bffc8ed13894e..f6dc44e8016c99abac208e95459209af2fca818d 100644 (file)
@@ -319,7 +319,8 @@ void context_loop(int *sock)
        int nLine = 0;
        int LineLen;
        void *vLine;
-       StrBuf *Buf, *Line, *LastLine, *HeaderName, *ReqLine, *accept_language, *ReqType, *HTTPVersion;
+       StrBuf *Buf, *Line, *LastLine, *HeaderName, *ReqLine, *ReqType, *HTTPVersion;
+       StrBuf *accept_language = NULL;
        const char *pch, *pchs, *pche;
        HashList *HTTPHeaders;
 
@@ -446,8 +447,8 @@ void context_loop(int *sock)
        StrBufCutLeft(ReqLine, StrLength(ReqType) + 1);
        StrBufCutRight(ReqLine, StrLength(HTTPVersion) + 1);
 
-       if ((StrLength(ReqLine) >= 7) &&
-           (ptr = strstr(ChrPtr(ReqLine), "/webcit"),  /*< Handle "/webcit" */
+       if ((StrLength(ReqLine) >= 8) &&
+           (ptr = strstr(ChrPtr(ReqLine), "/webcit/"), /*< Handle "/webcit/" */
             (ptr != NULL))) {
                StrBufCutLeft(ReqLine, 7);
        }
index ffa628aeafb645f48db3502f936996be3f287720..fef2c6dccac79aba2140334b731b1b60b4775165 100644 (file)
@@ -360,7 +360,7 @@ void init_ssl(void)
  * \return Zero if the SSL/TLS handshake succeeded, non-zero otherwise.
  */
 int starttls(int sock) {
-       int retval, bits, alg_bits;
+       int retval, bits, alg_bits, r;
        SSL *newssl;
 
        pthread_setspecific(ThreadSSL, NULL);
@@ -412,7 +412,7 @@ int starttls(int sock) {
                newssl = NULL;
                return(4);
        } else lprintf(15, "SSL_accept success\n");
-       BIO_set_close(newssl->rbio, BIO_NOCLOSE);
+       r = BIO_set_close(newssl->rbio, BIO_NOCLOSE);
        bits = SSL_CIPHER_get_bits(SSL_get_current_cipher(newssl), &alg_bits);
        lprintf(15, "SSL/TLS using %s on %s (%d of %d bits)\n",
                SSL_CIPHER_get_name(SSL_get_current_cipher(newssl)),
index 422f580da00c2b1c11e97015b5c7aa9f83eaf64d..b52c1a13d79f1d09726975cbcbe3f9713bfc7250 100644 (file)
@@ -767,6 +767,10 @@ void http_redirect(const char *whichpage) {
 void http_transmit_thing(const char *content_type,
                         int is_static) {
 
+       lprintf(9, "http_transmit_thing(%s)%s\n",
+               content_type,
+               (is_static ? " (static)" : "")
+       );
        output_headers(0, 0, 0, 0, 0, is_static);
 
        hprintf("Content-type: %s\r\n"
@@ -861,9 +865,7 @@ void output_static(char *what)
 
 
                close(fd);
-#ifndef TECH_PREVIEW
                lprintf(9, "output_static('%s')  %s\n", what, content_type);
-#endif
                http_transmit_thing(content_type, 1);
        }
        if (yesbstr("force_close_session")) {
@@ -1331,7 +1333,8 @@ void session_loop(HashList *HTTPHeaders, StrBuf *ReqLine, StrBuf *request_method
        char buf[SIZ];
        int a, nBackDots, nEmpty;
        int ContentLength = 0;
-       StrBuf *ContentType, *UrlLine;
+       StrBuf *ContentType = NULL;
+       StrBuf *UrlLine = NULL;
        StrBuf *content = NULL;
        const char *content_end = NULL;
        char browser_host[256];