From: Michael Wallner Date: Thu, 7 Nov 2013 19:45:51 +0000 (+0100) Subject: flush X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ab71b0889a1242f35d279a8641f2ff100ba2940b;p=mdref%2Fmdref flush --- diff --git a/http.md b/http.md index a2d427b..16eaaae 100644 --- a/http.md +++ b/http.md @@ -4,14 +4,13 @@ ## About: -Extended HTTP support. Again. Keep in mind that it's got the major version 2, because it's incompatible with pecl_http v1. +Extended HTTP support. Again. * Introduces the http namespace. -* Message bodies have been remodeled to use PHP temporary streams instead of in-memory buffers. -* The utterly misunderstood HttpResponse class has been reimplemented as http\Env\Response inheriting http\Message. -* Currently, there's only one Exception class left, http\Exception. -* Errors triggered by the extension can be configured statically by http\Object::$defaultErrorHandling or inherited http\Object->errorHandling. -* The request ecosystem has been modularized to support different libraries, though for the moment only libcurl is supported. +* PHP stream based message bodies. +* Encapsulated env request/response. +* Versatile error handling. +* Modular client support. ## Installation: @@ -19,8 +18,42 @@ This extension is hosted at PECL () and can be installed ei # pecl install pecl_http +## Dependencies: + +This extension unconditionally depends on the pre-loaded presence of the following PHP extensions: + +* raphf +* propro +* spl + + +If configured ```--with-http-shared-deps``` (default) it requires on the pre-loaded presence of the following extensions, as long as they where available at build time: + +* hash +* iconv +* json + +## Conflicts: + +pecl/http-v2 conflicts with thw following extensions: + +* http-v1 +* event + ## INI Directives: * http.etag.mode = "crc32b" Default hash method for dynamic response payloads to generate an ETag. +## Stream Filters: + +The http extension registers the ```http.*``` namespace for its stream filters. Provided stream filters are: + +* http.chunked_decode + Decode a stream encoded with chunked transfer encoding. +* http.chunked_encode + Encode a stream with chunked transfer encoding. +* http.inflate + Decode a stream encoded with deflate/zlib/gzip encoding. +* http.deflate + Encode a stream with deflate/zlib/gzip encoding. diff --git a/http/Encoding.md b/http/Encoding.md new file mode 100644 index 0000000..2de9a65 --- /dev/null +++ b/http/Encoding.md @@ -0,0 +1 @@ +# namespace http\Encoding diff --git a/http/Encoding/Stream.md b/http/Encoding/Stream.md new file mode 100644 index 0000000..99f7dcc --- /dev/null +++ b/http/Encoding/Stream.md @@ -0,0 +1,12 @@ +# abstract class http\Encoding\Stream extends http\Object + +Base for encoding stream implementations. + +## Constants: + +* FLUSH_NONE + Do no intermittend flushes. +* FLUSH_SYNC + Flush at appropriate transfer points. +* FLUSH_FULL + Flush at each IO operation. diff --git a/http/Exception.md b/http/Exception.md index 7c18655..4f6609e 100644 --- a/http/Exception.md +++ b/http/Exception.md @@ -1,3 +1,27 @@ # class http\Exception extends Exception The http extension's Exception. + +## Constants: + +* E_UNKNOWN +* E_RUNTIME +* E_INVALID_PARAM +* E_HEADER +* E_MALFORMED_HEADERS +* E_MESSAGE +* E_MESSAGE_TYPE +* E_MESSAGE_BODY +* E_ENCODING +* E_CLIENT +* E_CLIENT_POOL +* E_CLIENT_DATASHARE +* E_SOCKET +* E_RESPONSE +* E_URL +* E_QUERYSTRING +* E_COOKIE + +## Properties: + +None. diff --git a/index.css b/index.css index 994405e..0f33468 100644 --- a/index.css +++ b/index.css @@ -15,6 +15,9 @@ body { body>* { margin-left: 1em; } +body>ul { + margin-left: 2em; +} .sidebar { font-size: .9em;