dnl NEON
dnl ----
- AC_MSG_CHECKING([for neon/ne_session.h])
- NEON_DIR=
- for i in "$PHP_HTTP_LIBNEON_DIR" /usr/local /usr /opt; do
- if test -f "$i/include/neon/ne_session.h"; then
- NEON_DIR=$i
- break
- fi
- done
-
- if test "x$NEON_DIR" = "x"; then
- AC_MSG_RESULT([not found])
+ if test "$PHP_HTTP_LIBNEON_DIR" = "no"; then
+ AC_DEFINE([PHP_HTTP_HAVE_NEON], [0], [ ])
else
- AC_MSG_RESULT([found in $NEON_DIR])
-
- AC_MSG_CHECKING([for neon-config])
- NEON_CONFIG=
- for i in "$NEON_DIR/bin/neon-config" "$NEON_DIR/neon-config" `which neon-config`; do
- if test -x "$i"; then
- NEON_CONFIG=$i
+ AC_MSG_CHECKING([for neon/ne_session.h])
+ NEON_DIR=
+ for i in "$PHP_HTTP_LIBNEON_DIR" /usr/local /usr /opt; do
+ if test -f "$i/include/neon/ne_session.h"; then
+ NEON_DIR=$i
break
fi
done
- if test "x$NEON_CONFIG" = "x"; then
+
+ if test "x$NEON_DIR" = "x"; then
AC_MSG_RESULT([not found])
- AC_MSG_ERROR([could not find neon-config])
+ AC_DEFINE([PHP_HTTP_HAVE_NEON], [0], [ ])
else
- AC_MSG_RESULT([found: $NEON_CONFIG])
- fi
+ AC_MSG_RESULT([found in $NEON_DIR])
- AC_MSG_CHECKING([for libneon version])
- PHP_HTTP_NEON_VERSION=`$NEON_CONFIG --version | $SED -re 's/^neon ([[^ :]]+).*/\1/g'`
- if test "x$PHP_HTTP_NEON_VERSION" = "x"; then
- AC_MSG_RESULT([unknown])
- PHP_HTTP_NEON_VERSION="unknown"
- else
- AC_MSG_RESULT([$PHP_HTTP_NEON_VERSION])
+ AC_MSG_CHECKING([for neon-config])
+ NEON_CONFIG=
+ for i in "$NEON_DIR/bin/neon-config" "$NEON_DIR/neon-config" `which neon-config`; do
+ if test -x "$i"; then
+ NEON_CONFIG=$i
+ break
+ fi
+ done
+ if test "x$NEON_CONFIG" = "x"; then
+ AC_MSG_RESULT([not found])
+ AC_DEFINE([PHP_HTTP_HAVE_NEON], [0], [ ])
+ else
+ AC_MSG_RESULT([found: $NEON_CONFIG])
+
+ AC_MSG_CHECKING([for libneon version])
+ PHP_HTTP_NEON_VERSION=`$NEON_CONFIG --version | $SED -re 's/^neon ([[^ :]]+).*/\1/g'`
+ if test "x$PHP_HTTP_NEON_VERSION" = "x"; then
+ AC_MSG_RESULT([unknown])
+ PHP_HTTP_NEON_VERSION="unknown"
+ else
+ AC_MSG_RESULT([$PHP_HTTP_NEON_VERSION])
+ fi
+ AC_DEFINE_UNQUOTED([PHP_HTTP_NEON_VERSION], ["$PHP_HTTP_NEON_VERSION"], [neon-config --version])
+ PHP_ADD_INCLUDE($NEON_DIR/include)
+ PHP_ADD_LIBRARY_WITH_PATH(neon, $NEON_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
+ AC_DEFINE([PHP_HTTP_HAVE_NEON], [1], [Have libneon support])
+ HTTP_HAVE_A_REQUEST_LIB=true
+ fi
fi
- AC_DEFINE_UNQUOTED([PHP_HTTP_NEON_VERSION], ["$PHP_HTTP_NEON_VERSION"], [neon-config --version])
- PHP_ADD_INCLUDE($NEON_DIR/include)
- PHP_ADD_LIBRARY_WITH_PATH(neon, $NEON_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
- AC_DEFINE([PHP_HTTP_HAVE_NEON], [1], [Have libneon support])
- HTTP_HAVE_A_REQUEST_LIB=true
fi
-
+
dnl ----
dnl SERF
dnl ----
- AC_MSG_CHECKING([for serf-?/serf.h])
- SERF_DIR=
- for i in "$PHP_HTTP_LIBSERF_DIR" /usr/local /usr /opt; do
- if test -f "$i/include/serf-0/serf.h"; then
- SERF_DIR=$i
- SERF_VER=0
- break
- elif test -f "$i/include/serf-1/serf.h"; then
- SERF_DIR=$i
- SERF_VER=1
- fi
- done
-
- if test "x$SERF_DIR" = "x"; then
- AC_MSG_RESULT([not found])
+ if test "$PHP_HTTP_LIBSERF_DIR" = "no"; then
+ AC_DEFINE([PHP_HTTP_HAVE_SERF], [0], [ ])
else
- AC_MSG_RESULT([found in $SERF_DIR])
+ AC_MSG_CHECKING([for serf-?/serf.h])
+ SERF_DIR=
+ for i in "$PHP_HTTP_LIBSERF_DIR" /usr/local /usr /opt; do
+ if test -f "$i/include/serf-0/serf.h"; then
+ SERF_DIR=$i
+ SERF_VER=0
+ break
+ elif test -f "$i/include/serf-1/serf.h"; then
+ SERF_DIR=$i
+ SERF_VER=1
+ fi
+ done
- PHP_ADD_INCLUDE($SERF_DIR/include/serf-$SERV_VER)
- PHP_ADD_LIBRARY_WITH_PATH(serf-$SERF_VER, $SERF_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
- AC_DEFINE([PHP_HTTP_HAVE_SERF], [1], [HAve libserf support])
- HTTP_HAVE_A_REQUEST_LIB=true
+ if test "x$SERF_DIR" = "x"; then
+ AC_MSG_RESULT([not found])
+ AC_DEFINE([PHP_HTTP_HAVE_SERF], [0], [ ])
+ else
+ AC_MSG_RESULT([found in $SERF_DIR])
+
+ PHP_ADD_INCLUDE($SERF_DIR/include/serf-$SERV_VER)
+ PHP_ADD_LIBRARY_WITH_PATH(serf-$SERF_VER, $SERF_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
+ AC_DEFINE([PHP_HTTP_HAVE_SERF], [1], [Have libserf support])
+ HTTP_HAVE_A_REQUEST_LIB=true
+ fi
fi
dnl ----
dnl CURL
dnl ----
- AC_MSG_CHECKING([for curl/curl.h])
- CURL_DIR=
- for i in "$PHP_HTTP_LIBCURL_DIR" /usr/local /usr /opt; do
- if test -f "$i/include/curl/curl.h"; then
- CURL_DIR=$i
- break
- fi
- done
- if test "x$CURL_DIR" = "x"; then
- AC_MSG_RESULT([not found])
+
+ if test "$PHP_HTTP_LIBCURL_DIR" = "no"; then
+ AC_DEFINE([PHP_HTTP_HAVE_CURL], [0], [ ])
else
- AC_MSG_RESULT([found in $CURL_DIR])
-
- AC_MSG_CHECKING([for curl-config])
- CURL_CONFIG=
- for i in "$CURL_DIR/bin/curl-config" "$CURL_DIR/curl-config" `which curl-config`; do
- if test -x "$i"; then
- CURL_CONFIG=$i
+ AC_MSG_CHECKING([for curl/curl.h])
+ CURL_DIR=
+ for i in "$PHP_HTTP_LIBCURL_DIR" /usr/local /usr /opt; do
+ if test -f "$i/include/curl/curl.h"; then
+ CURL_DIR=$i
break
fi
done
- if test "x$CURL_CONFIG" = "x"; then
+ if test "x$CURL_DIR" = "x"; then
AC_MSG_RESULT([not found])
- AC_MSG_ERROR([could not find curl-config])
else
- AC_MSG_RESULT([found: $CURL_CONFIG])
- fi
+ AC_MSG_RESULT([found in $CURL_DIR])
- dnl Debian stable has currently 7.18.2
- AC_MSG_CHECKING([for curl version >= 7.18.2])
- CURL_VERSION=`$CURL_CONFIG --version | $SED -e 's/[[^0-9\.]]//g'`
- AC_MSG_RESULT([$CURL_VERSION])
- if test `echo $CURL_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71802; then
- AC_MSG_ERROR([libcurl version greater or equal to 7.18.2 required])
- fi
+ AC_MSG_CHECKING([for curl-config])
+ CURL_CONFIG=
+ for i in "$CURL_DIR/bin/curl-config" "$CURL_DIR/curl-config" `which curl-config`; do
+ if test -x "$i"; then
+ CURL_CONFIG=$i
+ break
+ fi
+ done
+ if test "x$CURL_CONFIG" = "x"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([could not find curl-config])
+ else
+ AC_MSG_RESULT([found: $CURL_CONFIG])
+ fi
+
+ dnl Debian stable has currently 7.18.2
+ AC_MSG_CHECKING([for curl version >= 7.18.2])
+ CURL_VERSION=`$CURL_CONFIG --version | $SED -e 's/[[^0-9\.]]//g'`
+ AC_MSG_RESULT([$CURL_VERSION])
+ if test `echo $CURL_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*10000 + $2*100 + $3}'` -lt 71802; then
+ AC_MSG_ERROR([libcurl version greater or equal to 7.18.2 required])
+ fi
- dnl
- dnl compile tests
- dnl
+ dnl
+ dnl compile tests
+ dnl
- save_INCLUDES="$INCLUDES"
- INCLUDES=
- save_LIBS="$LIBS"
- LIBS=
- save_CFLAGS="$CFLAGS"
- CFLAGS=`$CURL_CONFIG --cflags`
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS=`$CURL_CONFIG --libs`
- LDFLAGS="$LDFLAGS $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
+ save_INCLUDES="$INCLUDES"
+ INCLUDES=
+ save_LIBS="$LIBS"
+ LIBS=
+ save_CFLAGS="$CFLAGS"
+ CFLAGS=`$CURL_CONFIG --cflags`
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS=`$CURL_CONFIG --libs`
+ LDFLAGS="$LDFLAGS $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
- AC_MSG_CHECKING([for SSL support in libcurl])
- CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
- if test "$CURL_SSL" = "SSL"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE([PHP_HTTP_HAVE_SSL], [1], [ ])
+ AC_MSG_CHECKING([for SSL support in libcurl])
+ CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
+ if test "$CURL_SSL" = "SSL"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([PHP_HTTP_HAVE_SSL], [1], [ ])
- AC_MSG_CHECKING([for openssl support in libcurl])
- AC_TRY_RUN([
- #include <curl/curl.h>
- int main(int argc, char *argv[]) {
- curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
- if (data && data->ssl_version && *data->ssl_version) {
- const char *ptr = data->ssl_version;
- while(*ptr == ' ') ++ptr;
- return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
+ AC_MSG_CHECKING([for openssl support in libcurl])
+ AC_TRY_RUN([
+ #include <curl/curl.h>
+ int main(int argc, char *argv[]) {
+ curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ if (data && data->ssl_version && *data->ssl_version) {
+ const char *ptr = data->ssl_version;
+ while(*ptr == ' ') ++ptr;
+ return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
+ }
+ return 1;
}
- return 1;
- }
- ], [
- AC_MSG_RESULT([yes])
- AC_CHECK_HEADER([openssl/crypto.h], [
- AC_DEFINE([PHP_HTTP_HAVE_OPENSSL], [1], [ ])
+ ], [
+ AC_MSG_RESULT([yes])
+ AC_CHECK_HEADER([openssl/crypto.h], [
+ AC_DEFINE([PHP_HTTP_HAVE_OPENSSL], [1], [ ])
+ ])
+ ], [
+ AC_MSG_RESULT([no])
+ ], [
+ AC_MSG_RESULT([no])
])
- ], [
- AC_MSG_RESULT([no])
- ], [
- AC_MSG_RESULT([no])
- ])
- AC_MSG_CHECKING([for gnutls support in libcurl])
- AC_TRY_RUN([
- #include <curl/curl.h>
- int main(int argc, char *argv[]) {
- curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
- if (data && data->ssl_version && *data->ssl_version) {
- const char *ptr = data->ssl_version;
- while(*ptr == ' ') ++ptr;
- return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
+ AC_MSG_CHECKING([for gnutls support in libcurl])
+ AC_TRY_RUN([
+ #include <curl/curl.h>
+ int main(int argc, char *argv[]) {
+ curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ if (data && data->ssl_version && *data->ssl_version) {
+ const char *ptr = data->ssl_version;
+ while(*ptr == ' ') ++ptr;
+ return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
+ }
+ return 1;
}
- return 1;
- }
- ], [
- AC_MSG_RESULT([yes])
- AC_CHECK_HEADER([gcrypt.h], [
- AC_DEFINE([PHP_HTTP_HAVE_GNUTLS], [1], [ ])
+ ], [
+ AC_MSG_RESULT([yes])
+ AC_CHECK_HEADER([gcrypt.h], [
+ AC_DEFINE([PHP_HTTP_HAVE_GNUTLS], [1], [ ])
+ ])
+ ], [
+ AC_MSG_RESULT([no])
+ ], [
+ AC_MSG_RESULT([no])
])
- ], [
- AC_MSG_RESULT([no])
- ], [
+ else
AC_MSG_RESULT([no])
- ])
- else
- AC_MSG_RESULT([no])
- fi
+ fi
- INCLUDES="$save_INCLUDES"
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"
+ INCLUDES="$save_INCLUDES"
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"
- dnl end compile tests
+ dnl end compile tests
- AC_MSG_CHECKING([for bundled SSL CA info])
- CURL_CAINFO=
- for i in `$CURL_CONFIG --ca` "/etc/ssl/certs/ca-certificates.crt"; do
- if test -f "$i"; then
- CURL_CAINFO="$i"
- break
+ AC_MSG_CHECKING([for bundled SSL CA info])
+ CURL_CAINFO=
+ for i in `$CURL_CONFIG --ca` "/etc/ssl/certs/ca-certificates.crt"; do
+ if test -f "$i"; then
+ CURL_CAINFO="$i"
+ break
+ fi
+ done
+ if test "x$CURL_CAINFO" = "x"; then
+ AC_MSG_RESULT([not found])
+ else
+ AC_MSG_RESULT([$CURL_CAINFO])
+ AC_DEFINE_UNQUOTED([PHP_HTTP_CURL_CAINFO], ["$CURL_CAINFO"], [path to bundled SSL CA info])
fi
- done
- if test "x$CURL_CAINFO" = "x"; then
- AC_MSG_RESULT([not found])
- else
- AC_MSG_RESULT([$CURL_CAINFO])
- AC_DEFINE_UNQUOTED([PHP_HTTP_CURL_CAINFO], ["$CURL_CAINFO"], [path to bundled SSL CA info])
- fi
- PHP_ADD_INCLUDE($CURL_DIR/include)
- PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
- PHP_EVAL_LIBLINE(`$CURL_CONFIG --libs`, HTTP_SHARED_LIBADD)
- AC_DEFINE([PHP_HTTP_HAVE_CURL], [1], [Have libcurl support])
- HTTP_HAVE_A_REQUEST_LIB=true
+ PHP_ADD_INCLUDE($CURL_DIR/include)
+ PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD)
+ PHP_EVAL_LIBLINE(`$CURL_CONFIG --libs`, HTTP_SHARED_LIBADD)
+ AC_DEFINE([PHP_HTTP_HAVE_CURL], [1], [Have libcurl support])
+ HTTP_HAVE_A_REQUEST_LIB=true
+ fi
fi
- dnl ----
- dnl EVENT
- dnl ----
-
- if test "$PHP_HTTP_LIBEVENT_DIR" != "no"; then
+dnl ----
+dnl EVENT
+dnl ----
+
+ if test "$PHP_HTTP_LIBEVENT_DIR" = "no"; then
+ AC_DEFINE([PHP_HTTP_HAVE_EVENT], [0], [ ])
+ else
HTTP_HAVE_PHP_EXT([event], [
AC_MSG_WARN([event support is incompatible with pecl/event; continuing without libevent support])
+ AC_DEFINE([PHP_HTTP_HAVE_EVENT], [0], [ ])
], [
AC_MSG_CHECKING([for event.h])
EVENT_DIR=
if test "x$EVENT_DIR" = "x"; then
AC_MSG_RESULT([not found])
AC_MSG_WARN([continuing without libevent support])
+ AC_DEFINE([PHP_HTTP_HAVE_EVENT], [0], [ ])
else
AC_MSG_RESULT([found in $EVENT_DIR])
fi
PHP_ARG_WITH([http-shared-deps], [whether to depend on extensions which have been built shared],
-[ --without-http-shared-deps HTTP: do not depend on extensions like hash
- and iconv (when they're built shared)], $PHP_HTTP, $PHP_HTTP)
+[ --without-http-shared-deps HTTP: do not depend on extensions like hash
+ and iconv (when they're built shared)], $PHP_HTTP, $PHP_HTTP)
dnl ----
dnl HASH
dnl ----
php_http_url.h \
php_http_version.h \
"
- ifdef([PHP_INSTALL_HEADERS], [
- PHP_INSTALL_HEADERS(ext/http, $PHP_HTTP_HEADERS)
- ], [
- PHP_SUBST([PHP_HTTP_HEADERS])
- PHP_ADD_MAKEFILE_FRAGMENT
- ])
+ PHP_INSTALL_HEADERS(ext/http, $PHP_HTTP_HEADERS)
AC_DEFINE([HAVE_HTTP], [1], [Have extended HTTP support])
fi
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http.c 300300 2010-06-09 07:29:35Z mike $ */
-
#include "php_http.h"
#include <zlib.h>
-#ifdef PHP_HTTP_HAVE_CURL
+#if PHP_HTTP_HAVE_CURL
# include <curl/curl.h>
-# ifdef PHP_HTTP_HAVE_EVENT
+# if PHP_HTTP_HAVE_EVENT
# include <event.h>
# endif
#endif
-#ifdef PHP_HTTP_HAVE_NEON
+#if PHP_HTTP_HAVE_NEON
# include "neon/ne_utils.h"
#endif
+#if PHP_HTTP_HAVE_SERF
+# include "serf.h"
+#endif
#include <main/php_ini.h>
#include <ext/standard/info.h>
static zend_module_dep http_module_deps[] = {
ZEND_MOD_REQUIRED("spl")
-#ifdef PHP_HTTP_HAVE_HASH
+#if PHP_HTTP_HAVE_HASH
ZEND_MOD_REQUIRED("hash")
#endif
-#ifdef PHP_HTTP_HAVE_ICONV
+#if PHP_HTTP_HAVE_ICONV
ZEND_MOD_REQUIRED("iconv")
#endif
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
ZEND_MOD_CONFLICTS("event")
#endif
{NULL, NULL, NULL, 0}
|| SUCCESS != PHP_MINIT_CALL(http_querystring)
|| SUCCESS != PHP_MINIT_CALL(http_request_factory)
|| SUCCESS != PHP_MINIT_CALL(http_request)
+#if PHP_HTTP_HAVE_CURL
|| SUCCESS != PHP_MINIT_CALL(http_curl)
+#endif
+#if PHP_HTTP_HAVE_NEON
|| SUCCESS != PHP_MINIT_CALL(http_neon)
+#endif
|| SUCCESS != PHP_MINIT_CALL(http_request_datashare)
|| SUCCESS != PHP_MINIT_CALL(http_request_method)
|| SUCCESS != PHP_MINIT_CALL(http_request_pool)
if (0
|| SUCCESS != PHP_MSHUTDOWN_CALL(http_message)
+#if PHP_HTTP_HAVE_CURL
|| SUCCESS != PHP_MSHUTDOWN_CALL(http_curl)
+#endif
+#if PHP_HTTP_HAVE_NEON
|| SUCCESS != PHP_MSHUTDOWN_CALL(http_neon)
+#endif
|| SUCCESS != PHP_MSHUTDOWN_CALL(http_request_datashare)
|| SUCCESS != PHP_MSHUTDOWN_CALL(http_request_factory)
|| SUCCESS != PHP_MSHUTDOWN_CALL(http_persistent_handle)
if (0
|| SUCCESS != PHP_RINIT_CALL(http_env)
|| SUCCESS != PHP_RINIT_CALL(http_request_datashare)
+#if PHP_HTTP_HAVE_CURL
|| SUCCESS != PHP_RINIT_CALL(http_curl)
+#endif
) {
return FAILURE;
}
php_info_print_table_start();
php_info_print_table_header(3, "Used Library", "Compiled", "Linked");
php_info_print_table_row(3, "libz", ZLIB_VERSION, zlibVersion());
-#ifdef PHP_HTTP_HAVE_CURL
+#if PHP_HTTP_HAVE_CURL
{
curl_version_info_data *cv = curl_version_info(CURLVERSION_NOW);
php_info_print_table_row(3, "libcurl", LIBCURL_VERSION, cv->version);
#else
php_info_print_table_row(3, "libcurl", "disabled", "disabled");
#endif
-#ifdef PHP_HTTP_HAVE_NEON
+#if PHP_HTTP_HAVE_NEON
{
char ne_v[16] = {0};
sscanf(ne_version_string(), "neon %15[^ :]", &ne_v[0]);
php_info_print_table_row(3, "libneon", "disabled", "disabled");
#endif
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
php_info_print_table_row(3, "libevent", PHP_HTTP_EVENT_VERSION, event_get_version());
#else
php_info_print_table_row(3, "libevent", "disabled", "disabled");
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http.h 300300 2010-06-09 07:29:35Z mike $ */
-
#ifndef PHP_EXT_HTTP_H
#define PHP_EXT_HTTP_H
struct php_http_env_globals env;
struct php_http_persistent_handle_globals persistent_handle;
struct php_http_request_datashare_globals request_datashare;
-#ifdef PHP_HTTP_HAVE_EVENT
- struct php_http_request_pool_globals request_pool;
+#if PHP_HTTP_HAVE_CURL && PHP_HTTP_HAVE_EVENT
+ struct php_http_curl_globals curl;
#endif
ZEND_END_MODULE_GLOBALS(php_http)
-
-/* $Id: php_http_buffer_t.c 211942 2006-04-24 17:17:09Z mike $ */
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php.h"
#include "php_http_buffer.h"
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
-/* $Id: php_http_buffer_t.h 229282 2007-02-07 15:31:50Z mike $ */
-
-#ifndef _PHP_HTTP_BUFFER_H
-#define _PHP_HTTP_BUFFER_H
+#ifndef PHP_HTTP_BUFFER_H
+#define PHP_HTTP_BUFFER_H
#ifndef PHP_HTTP_BUFFER_DEFAULT_SIZE
# define PHP_HTTP_BUFFER_DEFAULT_SIZE 256
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_cookie_api.c 298662 2010-04-27 13:42:32Z mike $ */
-
#include "php_http.h"
#include <ext/date/php_date.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_cookie_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_COOKIE_H
#define PHP_HTTP_COOKIE_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
+
+#if PHP_HTTP_HAVE_CURL
+
#include "php_http_request.h"
#include "php_http_request_pool.h"
#include <curl/curl.h>
#define PHP_HTTP_CURL_VERSION(x, y, z) (LIBCURL_VERSION_NUM >= (((x)<<16) + ((y)<<8) + (z)))
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
# include <event.h>
#endif
int unfinished; /* int because of curl_multi_perform() */
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
struct event *timeout;
unsigned useevents:1;
unsigned runsocket:1;
}
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
typedef struct php_http_request_pool_event {
struct event evnt;
php_http_curl_request_pool_t *curl = h->ctx;
TSRMLS_FETCH_FROM_CTX(h->ts);
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
if (curl->timeout) {
efree(curl->timeout);
curl->timeout = NULL;
struct timeval timeout;
php_http_curl_request_pool_t *curl = h->ctx;
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
if (curl->useevents) {
TSRMLS_FETCH_FROM_CTX(h->ts);
static int php_http_curl_request_pool_once(php_http_request_pool_t *h)
{
php_http_curl_request_pool_t *curl = h->ctx;
- TSRMLS_FETCH_FROM_CTX(h->ts);
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
if (curl->useevents) {
+ TSRMLS_FETCH_FROM_CTX(h->ts);
php_http_error(HE_WARNING, PHP_HTTP_E_RUNTIME, "not implemented");
return FAILURE;
}
return curl->unfinished;
}
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
static void dolog(int i, const char *m) {
fprintf(stderr, "%d: %s\n", i, m);
}
{
TSRMLS_FETCH_FROM_CTX(h->ts);
-#ifdef PHP_HTTP_HAVE_EVENT
+#if PHP_HTTP_HAVE_EVENT
php_http_curl_request_pool_t *curl = h->ctx;
if (curl->useevents) {
PHP_RINIT_FUNCTION(http_curl)
{
-#ifdef PHP_HTTP_HAVE_EVENT
- if (!PHP_HTTP_G->request_pool.event_base && !(PHP_HTTP_G->request_pool.event_base = event_init())) {
+#if PHP_HTTP_HAVE_EVENT
+ if (!PHP_HTTP_G->curl.event_base && !(PHP_HTTP_G->curl.event_base = event_init())) {
return FAILURE;
}
#endif
return SUCCESS;
}
+
+#endif /* PHP_HTTP_HAVE_CURL */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_CURL_H
#define PHP_HTTP_CURL_H
+#if PHP_HTTP_HAVE_CURL
+
PHP_HTTP_API php_http_request_ops_t *php_http_curl_get_request_ops(void);
PHP_HTTP_API php_http_request_pool_ops_t *php_http_curl_get_request_pool_ops(void);
PHP_HTTP_API php_http_request_datashare_ops_t *php_http_curl_get_request_datashare_ops(void);
extern PHP_MSHUTDOWN_FUNCTION(http_curl);
extern PHP_RINIT_FUNCTION(http_curl);
-#ifdef PHP_HTTP_HAVE_EVENT
-struct php_http_request_pool_globals {
+#if PHP_HTTP_HAVE_EVENT
+struct php_http_curl_globals {
void *event_base;
};
#endif
PHP_METHOD(HttpCURL, __construct);
-#endif
+#endif /* PHP_HTTP_HAVE_CURL */
+#endif /* PHP_HTTP_CURL_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_encoding_api.c 298592 2010-04-26 11:47:29Z mike $ */
-
#include "php_http.h"
#include <zlib.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_encoding_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_ENCODING_H
#define PHP_HTTP_ENCODING_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id $ */
-
#include "php_http.h"
#include <main/SAPI.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef PHP_HTTP_ENV_H
#define PHP_HTTP_ENV_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id $ */
-
#include "php_http.h"
#include <main/SAPI.h>
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_ENV_RESPONSE_H
#define PHP_HTTP_ENV_RESPONSE_H
PHP_MINIT_FUNCTION(http_env_response);
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
-#include "php_http.h"
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+#include "php_http.h"
-#ifdef PHP_HTTP_HAVE_HASH
+#if PHP_HTTP_HAVE_HASH
# include "php_hash.h"
#endif
void *ctx;
php_http_etag_t *e;
-#ifdef PHP_HTTP_HAVE_HASH
+#if PHP_HTTP_HAVE_HASH
const php_hash_ops *eho = NULL;
if (mode && (eho = php_hash_fetch_ops(mode, strlen(mode)))) {
unsigned char digest[128] = {0};
char *etag = NULL;
-#ifdef PHP_HTTP_HAVE_HASH
+#if PHP_HTTP_HAVE_HASH
const php_hash_ops *eho = NULL;
if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) {
PHP_HTTP_API size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t data_len)
{
-#ifdef PHP_HTTP_HAVE_HASH
+#if PHP_HTTP_HAVE_HASH
const php_hash_ops *eho = NULL;
if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) {
return data_len;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_ETAG_H
#define PHP_HTTP_ETAG_H
}
#endif /* PHP_HTTP_ETAG_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_exception_object.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
#include <Zend/zend_exceptions.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_exception_object.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_EXCEPTION_H
#define PHP_HTTP_EXCEPTION_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_filter_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
PHP_MINIT_FUNCTION(http_filter)
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_filter_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_FILTER_H
#define PHP_HTTP_FILTER_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
return php_http_header_parser_state_is(parser);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_HEADER_PARSER_H
#define PHP_HTTP_HEADER_PARSER_H
PHP_HTTP_API STATUS php_http_header_parser_parse(php_http_header_parser_t *parser, php_http_buffer_t *buffer, unsigned flags, HashTable *headers, php_http_info_callback_t callback_func, void *callback_arg);
#endif /* PHP_HTTP_HEADER_PARSER_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_headers_api.c 300300 2010-06-09 07:29:35Z mike $ */
-
#include "php_http.h"
PHP_HTTP_API STATUS php_http_headers_parse(const char *header, size_t length, HashTable *headers, php_http_info_callback_t callback_func, void **callback_data TSRMLS_DC)
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_headers_api.h 300300 2010-06-09 07:29:35Z mike $ */
-
#ifndef PHP_HTTP_HEADERS_H
#define PHP_HTTP_HEADERS_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_info_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
PHP_HTTP_API void php_http_info_default_callback(void **nothing, HashTable **headers, php_http_info_t *info TSRMLS_DC)
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_info_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_INFO_H
#define PHP_HTTP_INFO_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_message_api.c 298689 2010-04-28 06:50:06Z mike $ */
-
#include "php_http.h"
#include <main/SAPI.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_message.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_MESSAGE_H
#define PHP_HTTP_MESSAGE_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_message_body.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
#include <libgen.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_message_body_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_MESSAGE_BODY_H
#define PHP_HTTP_MESSAGE_BODY_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#include "php_http.h"
typedef struct php_http_message_parser_state_spec {
return php_http_message_parser_state_is(parser);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#ifndef PHP_HTTP_MESSAGE_PARSER_H
#define PHP_HTTP_MESSAGE_PARSER_H
PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_http_message_parser_t *parser, php_http_buffer_t *buffer, unsigned flags, php_http_message_t **message);
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id $ */
-
#include "php_http.h"
#include <ext/standard/php_lcg.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_api.h 298891 2010-05-03 08:26:38Z mike $ */
-
#ifndef PHP_HTTP_MISC_H
#define PHP_HTTP_MISC_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_headers_api.h 300300 2010-06-09 07:29:35Z mike $ */
-
#include "php_http.h"
#include <ext/standard/php_string.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_headers_api.h 300300 2010-06-09 07:29:35Z mike $ */
-
#ifndef PHP_HTTP_NEGOTIATE_H
#define PHP_HTTP_NEGOTIATE_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
+
+#if PHP_HTTP_HAVE_NEON
+
#include "php_http_request.h"
#include <ext/date/php_date.h>
ne_sock_exit();
return SUCCESS;
}
+
+#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_NEON_H
#define PHP_HTTP_NEON_H
+#if PHP_HTTP_HAVE_NEON
+
php_http_request_ops_t *php_http_neon_get_request_ops(void);
PHP_MINIT_FUNCTION(http_neon);
PHP_METHOD(HttpNEON, __construct);
+#endif /* PHP_HTTP_HAVE_NEON */
#endif /* PHP_HTTP_NEON_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_api.c 300299 2010-06-09 06:23:16Z mike $ */
-
-
#include "php_http.h"
STATUS php_http_new(zend_object_value *ov, zend_class_entry *ce, php_http_new_t create, zend_class_entry *parent_ce, void *intern_ptr, void **obj_ptr TSRMLS_DC)
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_api.c 300299 2010-06-09 06:23:16Z mike $ */
-
#ifndef PHP_HTTP_OBJECT_H
#define PHP_HTTP_OBJECT_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_api.c 300299 2010-06-09 06:23:16Z mike $ */
-
#include "php_http.h"
PHP_HTTP_API void php_http_params_parse_default_func(void *arg, const char *key, int keylen, const char *val, int vallen TSRMLS_DC)
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_api.h 298891 2010-05-03 08:26:38Z mike $ */
-
#ifndef PHP_HTTP_PARAMS_H
#define PHP_HTTP_PARAMS_H
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_persistent_handle_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
#ifndef PHP_HTTP_DEBUG_PHANDLES
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_persistent_handle_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_PERSISTENT_HANDLE_H
#define PHP_HTTP_PERSISTENT_HANDLE_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
-
php_http_property_proxy_t *php_http_property_proxy_init(php_http_property_proxy_t *proxy, zval *object, zval *member TSRMLS_DC)
{
if (!proxy) {
return SUCCESS;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#ifndef PHP_HTTP_PROPERTY_PROXY_H
#define PHP_HTTP_PROPERTY_PROXY_H
PHP_MINIT_FUNCTION(http_property_proxy);
#endif /* PHP_HTTP_PROPERTY_PROXY_H_ */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include "php_http.h"
#include <main/php_variables.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_querystring_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_QUERYSTRING_H
#define PHP_HTTP_QUERYSTRING_H
-/* API */
-
#ifdef PHP_HTTP_HAVE_ICONV
PHP_HTTP_API STATUS php_http_querystring_xlate(zval *dst, zval *src, const char *ie, const char *oe TSRMLS_DC);
#endif /* PHP_HTTP_HAVE_ICONV */
PHP_HTTP_API STATUS php_http_querystring_update(zval *qarray, zval *params, zval *qstring TSRMLS_DC);
-/* PHP */
-
typedef struct php_http_querystring_object {
zend_object zo;
} php_http_querystring_object_t;
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_request_api.c 298591 2010-04-26 11:46:55Z mike $ */
-
#include "php_http.h"
#include <ext/spl/spl_observer.h>
#include <ext/spl/spl_iterators.h>
#include <Zend/zend_interfaces.h>
-
PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
{
php_http_request_t *free_h = NULL;
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_request_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_REQUEST_H
#define PHP_HTTP_REQUEST_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
return SUCCESS;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_REQUEST_DATASHARE_H
#define PHP_HTTP_REQUEST_DATASHARE_H
PHP_METHOD(HttpRequestDataShare, reset);
#endif /* PHP_HTTP_REQUEST_DATASHARE_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
return SUCCESS;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_REQUEST_FACTORY_H
#define PHP_HTTP_REQUEST_FACTORY_H
extern PHP_MSHUTDOWN_FUNCTION(http_request_factory);
#endif /* PHP_HTTP_REQUEST_FACTORY_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_request_info.c 293136 2010-01-05 08:48:52Z mike $ */
-
#include "php_http.h"
PHP_HTTP_API void php_http_request_info(php_http_request_t *request, HashTable *info)
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_request_method_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
#include <Zend/zend_interfaces.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_request_method_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_REQUEST_METHOD_H
#define PHP_HTTP_REQUEST_METHOD_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
return SUCCESS;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#ifndef PHP_HTTP_REQUESTPOOL_H
#define PHP_HTTP_REQUESTPOOL_H
PHP_MINIT_FUNCTION(http_request_pool);
#endif /* PHP_HTTP_REQUESTPOOL_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id:$ */
-
#include "php_http.h"
#include "php_http_resource_factory.h"
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef PHP_HTTP_RESOURCE_FACTORY_H
#define PHP_HTTP_RESOURCE_FACTORY_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#include "php_http.h"
return p;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#ifndef PHP_HTTP_STRLIST_H
#define PHP_HTTP_STRLIST_H
PHP_HTTP_API void php_http_strlist_iterator_free(php_http_strlist_iterator_t **iter);
#endif /* PHP_HTTP_STRLIST_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_url_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
#include "php_http.h"
#include <main/SAPI.h>
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_url_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
#ifndef PHP_HTTP_URL_H
#define PHP_HTTP_URL_H
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
#include "php_http.h"
PHP_HTTP_API php_http_version_t *php_http_version_init(php_http_version_t *v, unsigned major, unsigned minor TSRMLS_DC)
*v = NULL;
}
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
#ifndef PHP_HTTP_VERSION_H
#define PHP_HTTP_VERSION_H
#endif /* PHP_HTTP_VERSION_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+