From 1374172d6c717de67faf91519b100b5348329aee Mon Sep 17 00:00:00 2001
From: Michael Wallner
Date: Thu, 8 Jun 2006 22:07:39 +0000
Subject: [PATCH] - add HttpMessage::guessContentType() - release 1.0.0
---
docs/functions.html | 10 ++++++++-
http_message_object.c | 42 ++++++++++++++++++++++++++++++++++++++
http_send_api.c | 10 ++++-----
http_util_object.c | 2 ++
package.xml | 28 +++++++++++++------------
package2.xml | 9 +++++---
php_http_message_object.h | 1 +
tests/HttpRequest_010.phpt | 1 +
8 files changed, 80 insertions(+), 23 deletions(-)
diff --git a/docs/functions.html b/docs/functions.html
index 25b14cc..b939e06 100644
--- a/docs/functions.html
+++ b/docs/functions.html
@@ -576,6 +576,13 @@ HttpMessage::TYPE_REQUEST or supplied URL was empty.
Set the HTTP Protocol version of the Message.
Expects a string parameter containing the HTTP protocol version.
Returns TRUE on success, or FALSE if supplied version is out of range (1.0/1.1).
+string HttpMessage::guessContentType(string magic_file[, int magic_mode = MAGIC_MIME])
+Attempts to guess the content type of supplied payload through libmagic.
+Expects a string parameter specifying the magic.mime database to use.
+Additionally accepts an optional int parameter, being flags for libmagic.
+Returns the guessed content type on success, or FALSE on failure.
+Throws HttpRuntimeException, HttpInvalidParamException
+if http.only_exceptions is TRUE.
HttpMessage HttpMessage::getParentMessage()
Get parent Message.
Returns the parent HttpMessage on success, or NULL if there's none.
@@ -1289,6 +1296,7 @@ http.cache_log is set.
HttpMessage::setRequestUrl()
HttpMessage::getHttpVersion()
HttpMessage::setHttpVersion()
+HttpMessage::guessContentType()
HttpMessage::getParentMessage()
HttpMessage::send()
HttpMessage::toString()
@@ -1434,7 +1442,7 @@ http.cache_log is set.
- Generated at: Sun, 28 May 2006 17:55:39 +0200
+ Generated at: Thu, 08 Jun 2006 23:59:56 +0200