if (*colon == ' ')
colon++;
- if (!strcmp(buf, "Connection") && !strcmp(colon, "Close"))
+ if (!strcasecmp(buf, "Connection") && !strcasecmp(colon, "Close"))
closeconn = 1;
- if (!strcmp(buf, "Location")) {
+ if (!strcasecmp(buf, "Location")) {
vpninfo->redirect_url = strdup(colon);
if (!vpninfo->redirect_url)
return -ENOMEM;
}
- if (!strcmp(buf, "Content-Length")) {
+ if (!strcasecmp(buf, "Content-Length")) {
bodylen = atoi(colon);
if (bodylen < 0 || bodylen > buf_len) {
vpninfo->progress(vpninfo, PRG_ERR, "Response body too large for buffer (%d > %d)\n",
return -EINVAL;
}
}
- if (!strcmp(buf, "Set-Cookie")) {
+ if (!strcasecmp(buf, "Set-Cookie")) {
char *semicolon = strchr(colon, ';');
char *equals = strchr(colon, '=');
int ret;
if (ret)
return ret;
}
- if (!strcmp(buf, "Transfer-Encoding")) {
- if (!strcmp(colon, "chunked"))
+ if (!strcasecmp(buf, "Transfer-Encoding")) {
+ if (!strcasecmp(colon, "chunked"))
bodylen = -1;
else {
vpninfo->progress(vpninfo, PRG_ERR, "Unknown Transfer-Encoding: %s\n", colon);
return ret;
}
- if (strcmp(vpninfo->hostname, host) || port != vpninfo->port) {
+ if (strcasecmp(vpninfo->hostname, host) || port != vpninfo->port) {
free(vpninfo->hostname);
vpninfo->hostname = host;
vpninfo->port = port;