X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_headers_api.c;h=e320f46b8ca2864e108c70d425464361ef86a7da;hp=55be354afbc50feaf56817e64812647511b1b6ac;hb=60d91c35d7c2b4ce86ed67813f2f5a19266a30cc;hpb=229730a74c2686bdf501528cbe44a9421ccca61a diff --git a/http_headers_api.c b/http_headers_api.c index 55be354..e320f46 100644 --- a/http_headers_api.c +++ b/http_headers_api.c @@ -152,9 +152,7 @@ PHP_HTTP_API HashTable *_http_negotiate_q(const char *header, HashTable *support if (separator = strchr(Z_STRVAL_PP(entry), ';')) { const char *ptr = separator; - do { - ++ptr; - } while ((*ptr == ' ') || (*ptr == 'q') || (*ptr == '=')); + while (*++ptr && !isdigit(*ptr)); quality = strtod(ptr, NULL); identifier = estrndup(Z_STRVAL_PP(entry), separator - Z_STRVAL_PP(entry));