mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
when using checkprefix(), the first argument must be the prefix!
This commit is contained in:
parent
6d28f92ffe
commit
cdba92ac3c
@ -291,7 +291,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
k->hbuflen += nread;
|
k->hbuflen += nread;
|
||||||
if (!k->headerline && (k->hbuflen>5)) {
|
if (!k->headerline && (k->hbuflen>5)) {
|
||||||
/* make a first check that this looks like a HTTP header */
|
/* make a first check that this looks like a HTTP header */
|
||||||
if(!checkprefix(data->state.headerbuff, "HTTP/")) {
|
if(!checkprefix("HTTP/", data->state.headerbuff)) {
|
||||||
/* this is not the beginning of a HTTP first header line */
|
/* this is not the beginning of a HTTP first header line */
|
||||||
k->header = FALSE;
|
k->header = FALSE;
|
||||||
k->badheader = HEADER_ALLBAD;
|
k->badheader = HEADER_ALLBAD;
|
||||||
@ -345,7 +345,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
if(!k->headerline) {
|
if(!k->headerline) {
|
||||||
/* the first read header */
|
/* the first read header */
|
||||||
if((k->hbuflen>5) &&
|
if((k->hbuflen>5) &&
|
||||||
!checkprefix(data->state.headerbuff, "HTTP/")) {
|
!checkprefix("HTTP/", data->state.headerbuff)) {
|
||||||
/* this is not the beginning of a HTTP first header line */
|
/* this is not the beginning of a HTTP first header line */
|
||||||
k->header = FALSE;
|
k->header = FALSE;
|
||||||
k->badheader = HEADER_PARTHEADER;
|
k->badheader = HEADER_PARTHEADER;
|
||||||
|
Loading…
Reference in New Issue
Block a user