From e81100d361a8dc48fa491d973e936a19ea428853 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 3 Jan 2006 19:09:49 +0000 Subject: [PATCH] - prepare release 0.21.0 --- docs/functions.html | 136 +++++++++++++++++++++++++++----------------- funcsummary.php | 7 ++- http_request_api.c | 30 +++++----- package.xml | 18 +++++- package2.xml | 15 ++++- php_http.h | 2 +- 6 files changed, 135 insertions(+), 73 deletions(-) diff --git a/docs/functions.html b/docs/functions.html index 0e53c61..64d9c93 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -72,20 +72,8 @@ looking like: "Wed, 22 Dec 2004 11:34:47 GMT"

Takes an optional unix timestamp as parameter.

Returns the HTTP date as string.

-

string http_build_uri(string url[, string proto[, string host[, int port]]])

-

Build a complete URI according to the supplied parameters.

-

If the url is already abolute but a different proto was supplied,
-only the proto part of the URI will be updated. If url has no
-path specified, the path of the current REQUEST_URI will be taken.
-The host will be taken either from the Host HTTP header of the client
-the SERVER_NAME or just localhost if prior are not available.
-If a port is pecified in either the url or as sperate parameter,
-it will be added if it differs from te default port for HTTP(S).

-

Returns the absolute URI as string on success or false on failure.

-

Examples:


-<?php
$uri 
http_build_uri("page.php""https"NULL488);
?>
-

-

+

string http_build_url(mixed url[, mixed parts[, array &new_url]])

+

Returns the new URL as string on success or FALSE on failure.

string http_negotiate_language(array supported[, array &result])

This function negotiates the clients preferred language based on its
Accept-Language HTTP header. The qualifier is recognized and languages
@@ -196,7 +184,6 @@ the hash algorythm specified with the INI setting "http.etag_mode".

Sets the throttle delay and send buffer size for use with http_send() API.
Provides a basic throttling mechanism, which will yield the current process
resp. thread until the entity has been completely sent, though.

-

Note: This doesn't really work with the FastCGI SAPI.

Expects a double parameter specifying the seconds too sleep() after
each chunk sent. Additionally accepts an optional int parameter
representing the chunk size in bytes.

@@ -207,7 +194,7 @@ representing the chunk size in bytes.

void http_redirect([string url[, array params[, bool session = false[, int status = 302]]]])

Redirect to the given url.

-The supplied url will be expanded with http_build_uri(), the params array will
+The supplied url will be expanded with http_build_url(), the params array will
be treated with http_build_query() and the session identification will be appended
if session is true.

The HTTP response code will be set according to status.
@@ -218,7 +205,7 @@ You can use one of the following constants for convenience:
- HTTP_REDIRECT_TEMP 307 Temporary Redirect

Please see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
for which redirect response code to use in which situation.

-

To be RFC compliant, "Redirecting to URI." will be displayed,
+

To be RFC compliant, "Redirecting to URL." will be displayed,
if the client doesn't redirect immediatly, and the request method was
another one than HEAD.

Returns FALSE on failure, or *exits* on success.

@@ -358,28 +345,23 @@ See http_get() for a full list of available options.

Returns the request method name as string on success, or FALSE on failure.

string http_build_query(mixed formdata [, string prefix[, string arg_separator]])

Generates a form-encoded query string from an associative array or object.

-

string http_gzencode(string data[, int level = -1[, int mtime = 0]])

-

Compress data with the HTTP compatible GZIP encoding.

-

Expects the first parameter to be a string which contains the data that
-should be encoded. Additionally accepts an optional in paramter specifying
-the compression level, where -1 is default, 0 is no compression and 9 is
-best compression ratio.

-

Returns the encoded string on success, or NULL on failure.

-

string http_gzdecode(string data)

-

Uncompress data compressed with the HTTP compatible GZIP encoding.

-

Expects a string as parameter containing the compressed data.

-

Returns the decoded string on success, or NULL on failure.

-

string http_deflate(string data[, int level = -1[, bool zlib_header = false]])

-

Compress data with the HTTP compatible DEFLATE encoding.

+

string http_deflate(string data[, int flags = 0])

+

Compress data with gzip, zlib AKA deflate or raw deflate encoding.

Expects the first parameter to be a string containing the data that should
-be encoded. Additionally accepts an optional int parameter specifying the
-compression level, where -1 is default, 0 is no compression and 9 is best
-compression ratio.

+be encoded.

Returns the encoded string on success, or NULL on failure.

string http_inflate(string data)

-

Uncompress data compressed with the HTTP compatible DEFLATE encoding.

+

Uncompress data compressed with either gzip, deflate AKA zlib or raw
+deflate encoding.

Expects a string as parameter containing the compressed data.

Returns the decoded string on success, or NULL on failure.

+

string ob_deflatehandler(string data, int mode)

+

For use with ob_start(). The deflate output buffer handler can only be used once.
+It conflicts with ob_gzhanlder and zlib.output_compression as well and should
+not be used after ext/mbstrings mb_output_handler and ext/sessions URL-Rewriter (AKA
+session.use_trans_sid).

+

string ob_inflatehandler(string data, int mode)

+

For use with ob_start(). Same restrictions as with ob_deflatehandler apply.

int http_support([int feature = 0])

Check for feature that require external libraries.

Accpepts an optional in parameter specifying which feature to probe for.
@@ -400,6 +382,34 @@ all supported features that depend on external libraries.

Returns int, whether requested feature is supported, or a bitmask with
all supported features.


+

http_deflatestream_object.c

+

HttpDeflateStream

+

void HttpDeflateStream::__construct([int flags = 0])

+

Creates a new HttpDeflateStream object instance.

+

Accepts an optional int parameter specifying how to initialize the deflate stream.

+

string HttpDeflateStream::update(string data)

+

Passes more data through the deflate stream.

+

Expects a string parameter containing (a part of) the data to deflate.

+

Returns deflated data on success or FALSE on failure.

+

string HttpDeflateStream::flush([string data])

+

Flushes the deflate stream.

+

Returns some deflated data as string on success or FALSE on failure.

+

string HttpDeflateStream::finish([string data])

+

Finalizes the deflate stream. The deflate stream can be reused after finalizing.

+

Returns the final part of deflated data.

+
+

http_inflatestream_object.c

+

string HttpInflateStream::update(string data)

+

Passes more data through the inflate stream.

+

Expects a string parameter containing (a part of) the data to inflate.

+

Returns inflated data on success or FALSE on failure.

+

string HttpInflateStream::flush([string data])

+

Flush the inflate stream.

+

Returns some inflated data as string on success or FALSE on failure.

+

string HttpInflateStream::finish([string data])

+

Finalizes the inflate stream. The inflate stream can be reused after finalizing.

+

Returns the final part of inflated data.

+

http_message_object.c

HttpMessage

void HttpMessage::__construct([string message])

@@ -460,15 +470,15 @@ not of type HttpMessage::TYPE_REQUEST.

Expects a string parameter containing the request method name.

Returns TRUE on success, or FALSE if the message is not of type
HttpMessage::TYPE_REQUEST or an invalid request method was supplied.

-

string HttpMessage::getRequestUri()

-

Get the Request URI of the Message.

-

Returns the request uri as string on success, or FALSE if the message
+

string HttpMessage::getRequestUrl()

+

Get the Request URL of the Message.

+

Returns the request url as string on success, or FALSE if the message
is not of type HttpMessage::TYPE_REQUEST.

-

bool HttpMessage::setRequestUri(string URI)

-

Set the Request URI of the HTTP Message.

-

Expects a string parameters containing the request uri.

+

bool HttpMessage::setRequestUrl(string url)

+

Set the Request URL of the HTTP Message.

+

Expects a string parameters containing the request url.

Returns TRUE on success, or FALSE if the message is not of type
-HttpMessage::TYPE_REQUEST or supplied URI was empty.

+HttpMessage::TYPE_REQUEST or supplied URL was empty.

string HttpMessage::getHttpVersion()

Get the HTTP Protocol Version of the Message.

Returns the HTTP protocol version as string.

@@ -507,8 +517,6 @@ Additianally accepts an optional int parameter specifying the request method
passed to HttpRequest::setOptions().

Throws HttpException.

-

void HttpRequest::__destruct()

-

Destroys the HttpRequest object.

bool HttpRequest::setOptions([array options])

Set the request options to use. See http_get() for a full list of available options.

Accepts an array as optional parameters, wich values will overwrite the
@@ -719,6 +727,12 @@ request message received through HttpRequest::getRequestMessage() will
always look the same for the same request, regardless of any changes you
may have made to the returned object.

Throws HttpMalformedHeadersException, HttpEncodingException.

+

string HttpRequest::getRawRequestMessage()

+

Get sent HTTP message.

+

Returns an HttpMessage in a form of a string

+

string HttpRequest::getRawResponseMessage()

+

Get the entire HTTP response.

+

Returns the complete web server response, including the headers in a form of a string.

HttpMessage HttpRequest::getHistory()

Get all sent requests and received responses as an HttpMessage object.

If you don't want to record history at all, set the instance variable
@@ -977,7 +991,7 @@ http.cache_log is set.

+
  • http_deflatestream_object.c + +
  • +
  • http_inflatestream_object.c + +
  • http_message_object.c