Skip to content

Commit

Permalink
Fixed issue #149 (malformed hostname was passed)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Jan 25, 2020
1 parent e547372 commit c10081c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transports/curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ int php_yar_curl_open(yar_transport_interface_t *self, zend_string *address, lon
data->headers = curl_slist_append(data->headers, "Connection: close");
}

snprintf(buf, sizeof(buf), "Hostname: %s", url->host);
snprintf(buf, sizeof(buf), "Hostname: %s", ZSTR_VAL(url->host));
buf[sizeof(buf) - 1] = '\0';
data->headers = curl_slist_append(data->headers, buf);

Expand Down

0 comments on commit c10081c

Please sign in to comment.