X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_response_object.c;h=93c8f0c82193ca56993cb02928a12f21c017b707;hp=c0c66af090543aee016a5822866e0a04adee15c4;hb=dd18f054d481e2d24f766db8f36e8e721950d68c;hpb=c04184b2188a60efed4753d7eef7f3952aed9cef diff --git a/http_response_object.c b/http_response_object.c index c0c66af..93c8f0c 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -41,6 +41,9 @@ #ifdef HTTP_HAVE_MHASH # include #endif +#ifdef HTTP_HAVE_MAGIC +# include +#endif ZEND_EXTERN_MODULE_GLOBALS(http); @@ -545,6 +548,8 @@ PHP_METHOD(HttpResponse, guessContentType) } } SET_EH_NORMAL(); +#else + http_error(HE_THROW, HTTP_E_RUNTIME, "Cannot guess Content-Type; libmagic not available"); #endif } /* }}} */