X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_send_api.c;h=6fc9cc00916f3bfbc23ebf30b817bf1a780d0623;hp=f22a3d1fd398fb2a3e75ee46ff926accb5523659;hb=dd579c42c06ebfe26ea2ff8ee6106a22d27e3340;hpb=a896cda2c56ae9525e8d99622841350a1fb73926 diff --git a/http_send_api.c b/http_send_api.c index f22a3d1..6fc9cc0 100644 --- a/http_send_api.c +++ b/http_send_api.c @@ -231,10 +231,7 @@ PHP_HTTP_API STATUS _http_send_etag_ex(const char *etag, size_t etag_len, char * /* {{{ STATUS http_send_content_type(char *, size_t) */ PHP_HTTP_API STATUS _http_send_content_type(const char *content_type, size_t ct_len TSRMLS_DC) { - if (!strchr(content_type, '/')) { - http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Content-Type '%s' doesn't seem to consist of a primary and a secondary part", content_type); - return FAILURE; - } + HTTP_CHECK_CONTENT_TYPE(content_type, return FAILURE); /* remember for multiple ranges */ STR_FREE(HTTP_G(send).content_type);