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;
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);
}
* \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);
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)),
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"
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")) {
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];