X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_header.c;h=19cb936a7a3efb8a2fae5de5cd845e0a475ebd24;hp=4651ef5a5d6cfca1abd695f154f36876a7733ed0;hb=468e8d748d365811af4ce890fd8fc4c1f88cc08a;hpb=8d084b7e31a4985d75e74efbabf21a818513fd0f diff --git a/php_http_header.c b/php_http_header.c index 4651ef5..19cb936 100644 --- a/php_http_header.c +++ b/php_http_header.c @@ -33,12 +33,7 @@ ZEND_RESULT_CODE php_http_header_parse(const char *header, size_t length, HashTa php_http_header_parser_dtor(&ctx); php_http_buffer_dtor(&buf); - if (rs == PHP_HTTP_HEADER_PARSER_STATE_FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse headers"); - return FAILURE; - } - - return SUCCESS; + return rs == PHP_HTTP_HEADER_PARSER_STATE_FAILURE ? FAILURE : SUCCESS; } void php_http_header_to_callback(HashTable *headers, zend_bool crlf, php_http_pass_format_callback_t cb, void *cb_arg TSRMLS_DC)