Browse Source

User-Agent header no longer needs a leading space

master
Ben Brown 7 years ago
committed by Stefan Bühler
parent
commit
c24b5051c0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/weighttp.c

+ 1
- 1
src/weighttp.c View File

@@ -159,7 +159,7 @@ static char *forge_request(char *url, char keep_alive, char **host, uint16_t *po
continue;
}
len += strlen(headers[i]) + strlen("\r\n");
if (strncmp(headers[i], "User-Agent: ", sizeof("User-Agent: ")-1) == 0)
if (strncmp(headers[i], "User-Agent:", sizeof("User-Agent:")-1) == 0)
have_user_agent = 1;
}



Loading…
Cancel
Save