X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=README.md;h=d4fb44865ce24e82d93735eab990c321c2782518;hp=c0ee4d1b956facb7e60ed9c6b80f6e0b6b76e4e2;hb=e4094d44990e46a0adcc2138eca4053156cd2201;hpb=132f3febe114aa64f20a571b5b226ffcdf44d861 diff --git a/README.md b/README.md index c0ee4d1..d4fb448 100644 --- a/README.md +++ b/README.md @@ -1,121 +1,55 @@ -# pecl/http v2 +# ext-http -[![Build Status](https://travis-ci.org/m6w6/ext-http.svg?branch=R_2_5)](https://travis-ci.org/m6w6/ext-http) +[![Build Status](https://github.com/m6w6/ext-http/workflows/ci/badge.svg?branch=master)](https://github.com/m6w6/ext-http/actions?query=workflow%3Aci+branch%3Amaster) +[![Coverity Scan Build Status](https://scan.coverity.com/projects/8711/badge.svg)](https://scan.coverity.com/projects/m6w6-ext-http) +[![codecov](https://codecov.io/gh/m6w6/ext-http/branch/master/graph/badge.svg)](https://codecov.io/gh/m6w6/ext-http) -## About: +Extended HTTP support for PHP. -Extended HTTP support. Again. +## Branches and Versions: -* Introduces the http namespace. -* PHP stream based message bodies. -* Encapsulated env request/response. -* Modular client support. +> **NOTE:** + Use `v3.x` branch, and resp. v3 releases, for PHP-7. `master` and v4 releases are only for PHP-8. -## Installation: -This extension is hosted at [PECL](http://pecl.php.net) and can be installed with [PEAR](http://pear.php.net)'s pecl command: +## Documentation - # pecl install pecl_http +See the [online markdown reference](https://mdref.m6w6.name/http). -## Dependencies: +Known issues are listed in [BUGS](./BUGS) and future ideas can be found in [TODO](./TODO). -pecl/http depends on a number of system libraries and PHP extensions for special features. +## Install -#### Required system libraries: +### PECL -The following system libraries are required to build this extension: + pecl install pecl_http -##### zlib -Provides gzip/zlib/deflate encoding. -Minimum version: 1.2.0.4 -Install on Debian: `apt-get install zlib1g-dev` +### PHARext +Watch out for [PECL replicates](https://replicator.pharext.org?pecl_http) +and pharext packages attached to [releases](https://github.com/m6w6/ext-http/releases). -#### Optional system libraries: +### Checkout -The following system libraries are optional and provide additional features: + git clone https://github.com/m6w6/ext-http.git + cd ext-http + /path/to/phpize + ./configure --with-php-config=/path/to/php-config + make + sudo make install -##### libidn -Provides IDNA support in URLs. -Minimum version: none -Install on Debian: `apt-get install libidn11-dev` +## ChangeLog -##### libidn2 -Provides IDNA support in URLs (fallback if libidn is not available). -Minimum version: none -Install on Debian: `apt-get install libidn2-0-dev` +A comprehensive list of changes can be obtained from the [ChangeLog](./CHANGELOG.md) and the list of [fixed CVEs](./CVE.md). -##### libicu -Provides IDNA support in URLs (fallback if libidn is not available). -Minimum version: none -Install on Debian: `apt-get install libicu-dev` +## License -##### libcurl -Provides HTTP request functionality. -Minimum version: 7.18.2 -Install on Debian: `apt-get install libcurl4-openssl-dev` -Note: There are usually different styles of SSL support for libcurl available, so you can replace 'openssl' in the above command f.e. with 'nss' or 'gnutls'. +ext-http is licensed under the 2-Clause-BSD license, which can be found in +the accompanying [LICENSE](./LICENSE) file. -##### libevent -Eventloop support for the HTTP client. -Minimum version: none -Install on Debian: `apt-get install libevent-dev` +## Contributing -### PHP extensions: +All forms of contribution are welcome! Please see the bundled +[CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed. -This extension unconditionally depends on the pre-loaded presence of the following PHP extensions: - -* [raphf](https://github.com/m6w6/ext-raphf) -* [propro](https://github.com/m6w6/ext-propro) -* spl - - -If configured ```--with-http-shared-deps``` (default) it depends on the pre-loaded presence of the following extensions, as long as they were available at build time: - -* hash -* iconv -* json (only until < 2.4.0) - -Please ensure that all extension on which pecl/http depends, are loaded before it, e.g in your `php.ini`: - - ; obligatory deps - extension = raphf.so - extension = propro.so - - ; if shared deps were enabled - extension = hash.so - extension = iconv.so - extension = json.so - - ; finally load pecl/http - extension = http.so - -## Conflicts: - -pecl/http-v2 conflicts with the following extensions: - -* http-v1 -* event (only until <= 2.0.3) - -## 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. - - -## Documentation: - -Documentation is available at https://mdref.m6w6.name/http +The list of past and current contributors is maintained in [THANKS](./THANKS).