Promote libz and libmagic to required dependencies.

This commit is contained in:
Jon Siwek 2011-11-11 12:39:00 -06:00
parent 151664bc26
commit d750c3ba74
20 changed files with 26 additions and 114 deletions

View file

@ -43,9 +43,7 @@ HTTP_Entity::HTTP_Entity(HTTP_Message *arg_message, MIME_Entity* parent_entity,
header_length = 0;
deliver_body = (http_entity_data != 0);
encoding = IDENTITY;
#ifdef HAVE_LIBZ
zip = 0;
#endif
}
void HTTP_Entity::EndOfData()
@ -53,7 +51,6 @@ void HTTP_Entity::EndOfData()
if ( DEBUG_http )
DEBUG_MSG("%.6f: end of data\n", network_time);
#ifdef HAVE_LIBZ
if ( zip )
{
zip->Done();
@ -61,7 +58,6 @@ void HTTP_Entity::EndOfData()
zip = 0;
encoding = IDENTITY;
}
#endif
if ( body_length )
http_message->MyHTTP_Analyzer()->
@ -179,7 +175,6 @@ private:
void HTTP_Entity::DeliverBody(int len, const char* data, int trailing_CRLF)
{
#ifdef HAVE_LIBZ
if ( encoding == GZIP || encoding == DEFLATE )
{
ZIP_Analyzer::Method method =
@ -198,7 +193,6 @@ void HTTP_Entity::DeliverBody(int len, const char* data, int trailing_CRLF)
zip->NextStream(len, (const u_char*) data, false);
}
else
#endif
DeliverBodyClear(len, data, trailing_CRLF);
}
@ -450,9 +444,7 @@ void HTTP_Entity::SubmitAllHeaders()
// content-length headers or if connection is to be closed afterwards
// anyway.
else if ( http_message->MyHTTP_Analyzer()->IsConnectionClose ()
#ifdef HAVE_LIBZ
|| encoding == GZIP || encoding == DEFLATE
#endif
)
{
// FIXME: Using INT_MAX is kind of a hack here. Better