X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=inline;f=http_headers_api.c;h=63c46abad58a8d23f2a9004ee568e9f7227062cd;hb=ffc893b125c6cc9b385a68a357b08ba2cc4e91f6;hp=4f255fe206a2aa656b0190d6f5b23ba06dbd6331;hpb=bb1f32fd5d06b9b9ace6517c177b0fe58c9ff57c;p=m6w6%2Fext-http diff --git a/http_headers_api.c b/http_headers_api.c index 4f255fe..63c46ab 100644 --- a/http_headers_api.c +++ b/http_headers_api.c @@ -154,7 +154,7 @@ PHP_HTTP_API HashTable *_http_negotiate_q(const char *header, HashTable *support while (*++ptr && !isdigit(*ptr)); - quality = strtod(ptr, NULL); + quality = atof(ptr); identifier = estrndup(Z_STRVAL_PP(entry), separator - Z_STRVAL_PP(entry)); } else { quality = 1000.0 - i++; @@ -331,9 +331,7 @@ PHP_HTTP_API STATUS _http_parse_headers_ex(const char *header, HashTable *header size_t header_len; zval array; - INIT_PZVAL(&array); - Z_TYPE_P(array) = IS_ARRAY; - Z_ARRVAL(array) = headers; + INIT_ZARR(array, headers); if (body) { header_len = body - header;