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));
}
/* }}} */
}
/* }}} */
-/* {{{ proto static string HttpResponse::guessContentType(string magic_file[, long magic_mode = MAGIC_MIME])
+/* {{{ proto static string HttpResponse::guessContentType(string magic_file[, int magic_mode = MAGIC_MIME])
*
* Attempts to guess the content type of supplied payload through libmagic.
* If the attempt is successful, the guessed content type will automatically