X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_response_object.c;h=8be3efd7e988f1dc9308576d7b00df8e5bc2255c;hp=0e1eb29abd7455fdb3a26c9756722cc1498a3a30;hb=dd579c42c06ebfe26ea2ff8ee6106a22d27e3340;hpb=a896cda2c56ae9525e8d99622841350a1fb73926 diff --git a/http_response_object.c b/http_response_object.c index 0e1eb29..8be3efd 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -533,11 +533,7 @@ PHP_METHOD(HttpResponse, setContentType) RETURN_FALSE; } - if (!strchr(ctype, '/')) { - http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Content type '%s' doesn't seem to contain a primary and a secondary part", ctype); - RETURN_FALSE; - } - + HTTP_CHECK_CONTENT_TYPE(ctype, RETURN_FALSE); RETURN_SUCCESS(UPD_STATIC_STRL(contentType, ctype, ctype_len)); } /* }}} */