log.debug(format("[%d] %s %s",id, statusLine.getStatusCode(), statusLine.getReasonPhrase())) ;
throw new HttpException(statusLine.getStatusCode()+" "+statusLine.getReasonPhrase()) ;
}
String ct = "*" ;
MediaType mt = null ;
if ( statusLine.getStatusCode() == 200 )
{
String contentType = null ;
Header ctHeader = response.getFirstHeader(HttpNames.hContentType) ;
if (ctHeader == null)
log.info(format("[%d] %d %s :: No Content-Type in response", id, statusLine.getStatusCode(), statusLine.getReasonPhrase())) ;
else
{
contentType = ctHeader.getValue() ;
if (contentType != null)
{
mt = MediaType.create(contentType) ;
ct = mt.getContentType() ;
if (log.isDebugEnabled()) log.debug(format("[%d] %d %s :: %s", id, statusLine.getStatusCode(),
statusLine.getReasonPhrase(), mt)) ;
} else
{
if (log.isDebugEnabled()) log.debug(format("[%d] %d %s :: (no content type: header but no value)", id,