Skip to content
Snippets Groups Projects
Commit cdba92ac authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

when using checkprefix(), the first argument must be the prefix!

parent 6d28f92f
No related branches found
No related tags found
No related merge requests found
......@@ -291,7 +291,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
k->hbuflen += nread;
if (!k->headerline && (k->hbuflen>5)) {
/* 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 */
k->header = FALSE;
k->badheader = HEADER_ALLBAD;
......@@ -345,7 +345,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if(!k->headerline) {
/* the first read header */
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 */
k->header = FALSE;
k->badheader = HEADER_PARTHEADER;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment