diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index e56f8d4..72f17c7 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -2167,6 +2167,7 @@ static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e size_t id_len; int port = url->port ? url->port : 80; zval *zport; + php_persistent_handle_factory_t *phf = h->rf->data; if ((zport = zend_hash_str_find(enqueue->options, ZEND_STRL("port")))) { zend_long lport = zval_get_long(zport); @@ -2176,7 +2177,7 @@ static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e } } - id_len = spprintf(&id_str, 0, "%s:%d", STR_PTR(url->host), port); + id_len = spprintf(&id_str, 0, "%.*s:%s:%d", phf->ident->len, phf->ident->val, STR_PTR(url->host), port); id = php_http_cs2zs(id_str, id_len); pf = php_persistent_handle_concede(NULL, PHP_HTTP_G->client.curl.driver.request_name, id, NULL, NULL); zend_string_release(id);