Lines Matching refs:reqbuf
96 char reqbuf[REQBUFSIZ]; /* buffer area for the incoming request */ member
136 static void storerequest(const char *reqbuf, size_t totalsize);
366 char *line = &req->reqbuf[req->checkindex]; in ProcessRequest()
484 if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d", in ProcessRequest()
665 if(strstr(req->reqbuf, "\r\n0\r\n\r\n")) { in ProcessRequest()
669 else if(strstr(req->reqbuf, "\r\n0\r\n")) { in ProcessRequest()
670 char *last_crlf_char = strstr(req->reqbuf, "\r\n\r\n"); in ProcessRequest()
677 last_crlf_char > strstr(req->reqbuf, "\r\n0\r\n")) in ProcessRequest()
682 else if(already_recv_zeroed_chunk && strstr(req->reqbuf, "\r\n\r\n")) in ProcessRequest()
694 if(!req->auth && strstr(req->reqbuf, "Authorization:")) { in ProcessRequest()
700 if(strstr(req->reqbuf, "Authorization: Negotiate")) { in ProcessRequest()
713 else if(!req->digest && strstr(req->reqbuf, "Authorization: Digest")) { in ProcessRequest()
722 strstr(req->reqbuf, "Authorization: NTLM TlRMTVNTUAAD")) { in ProcessRequest()
732 strstr(req->reqbuf, "Authorization: NTLM TlRMTVNTUAAB")) { in ProcessRequest()
739 strstr(req->reqbuf, "Authorization: Basic")) { in ProcessRequest()
746 if(strstr(req->reqbuf, "Connection: close")) in ProcessRequest()
751 req->reqbuf + req->offset > end + strlen(end_of_headers) && in ProcessRequest()
753 (!strncmp(req->reqbuf, "GET", strlen("GET")) || in ProcessRequest()
754 !strncmp(req->reqbuf, "HEAD", strlen("HEAD")))) { in ProcessRequest()
757 req->checkindex = (end - req->reqbuf) + strlen(end_of_headers); in ProcessRequest()
769 if(req->upgrade && strstr(req->reqbuf, "Upgrade:")) { in ProcessRequest()
777 if(req->cl <= req->offset - (end - req->reqbuf) - strlen(end_of_headers)) in ProcessRequest()
787 static void storerequest(const char *reqbuf, size_t totalsize) in storerequest() argument
799 if(!reqbuf) in storerequest()
816 written = fwrite(&reqbuf[totalsize-writeleft], in storerequest()
877 char *reqbuf = req->reqbuf; in get_request() local
887 reqbuf[req->offset] = '\0'; in get_request()
888 storerequest(reqbuf, req->offset); in get_request()
895 got = sread(sock, reqbuf + req->offset, REQBUFSIZ - req->offset); in get_request()
928 reqbuf[req->offset] = '\0'; in get_request()
929 storerequest(reqbuf, req->offset); in get_request()
946 got = sread(sock, reqbuf + req->offset, req->cl); in get_request()
948 got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset); in get_request()
967 reqbuf[req->offset] = '\0'; in get_request()
968 storerequest(reqbuf, req->offset); in get_request()
975 reqbuf[req->offset] = '\0'; in get_request()
985 reqbuf[REQBUFSIZ-1] = '\0'; in get_request()
991 reqbuf[REQBUFSIZ-1] = '\0'; in get_request()
995 reqbuf[req->offset] = '\0'; in get_request()
999 storerequest(reqbuf, req->offset); in get_request()