#include "php_http_api.h"
#include <php_ini.h>
-#include <ext/standard/php_string.h>
#include <ext/standard/info.h>
#include <zlib.h>
extern int http_module_number;
-#if PHP_DEBUG
-# define _DPF_STR 0
-# define _DPF_IN 1
-# define _DPF_OUT 2
-extern void _dpf(int type, const char *data, size_t length);
-#else
-# define _dpf(t,s,l);
-#endif
-
#endif /* PHP_EXT_HTTP_H */
/*
#include "config.h"
#endif
-#include <php.h>
#include <php_config.h>
+#include <php.h>
#include <SAPI.h>
+
+#include <ext/standard/php_string.h>
+#include <ext/spl/spl_iterators.h>
+#include <ext/date/php_date.h>
+
#include <zend_interfaces.h>
#if defined(PHP_WIN32)
#define PHP_HTTP_IS_CTYPE(type, c) is##type((int) (unsigned char) (c))
#define PHP_HTTP_TO_CTYPE(type, c) to##type((int) (unsigned char) (c))
+#include "php_http.h"
+
#include "php_http_buffer.h"
#include "php_http_strlist.h"
#include "php_http_misc.h"
# define PHP_HTTP_G (&php_http_globals)
#endif
+#if PHP_DEBUG
+# define _DPF_STR 0
+# define _DPF_IN 1
+# define _DPF_OUT 2
+extern void _dpf(int type, const char *data, size_t length);
+#else
+# define _dpf(t,s,l);
+#endif
+
#endif /* PHP_HTTP_API_H */
#include "php_http_api.h"
-#include <ext/date/php_date.h>
-
PHP_HTTP_API php_http_cookie_list_t *php_http_cookie_list_init(php_http_cookie_list_t *list TSRMLS_DC)
{
if (!list) {
# include <event.h>
#endif
-#include <ext/spl/spl_iterators.h>
-
-
typedef struct php_http_curl_request {
CURL *handle;
case CURL_POLL_REMOVE:
efree(ev);
+ /* no break */
case CURL_POLL_NONE:
return 0;
#include "php_http_api.h"
-#include <ext/date/php_date.h>
-#include <ext/standard/php_string.h>
-
-
static void set_option(zval *options, const char *name_str, size_t name_len, int type, const void *value_ptr, size_t value_len TSRMLS_DC)
{
if (Z_TYPE_P(options) == IS_OBJECT) {
if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
break;
}
+ /* no break */
default:
{
zval *num = php_http_ztyp(IS_LONG, *tmp);
flags |= (Z_LVAL_P(num) & 0x0fffffff);
zval_ptr_dtor(&num);
+
}
+ break;
}
}
if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags TSRMLS_CC))) {
#include "php_http_api.h"
-#include <SAPI.h>
-#include <ext/spl/spl_iterators.h>
-#include <zend_interfaces.h>
-
PHP_HTTP_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
{
php_http_message_t *old = *message;
#include "php_http_api.h"
#include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
#define BOUNDARY_OPEN(body) \
do {\
#include "php_http_api.h"
#include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
#include <zend_exceptions.h>
/* SLEEP */
#include "php_http_api.h"
-#include <ext/standard/php_string.h>
-
static int php_http_negotiate_sort(const void *a, const void *b TSRMLS_DC)
{
zval result, *first, *second;
#include "php_http_request.h"
-#include <ext/date/php_date.h>
-
#include <neon/ne_auth.h>
#include <neon/ne_compress.h>
#include <neon/ne_session.h>
#include "php_http_api.h"
-#include <ext/standard/php_string.h>
-#include <zend_interfaces.h>
-
static php_http_params_token_t def_param_sep = {",", 1}, *def_param_sep_ptr[] = {&def_param_sep, NULL};
static php_http_params_token_t def_arg_sep = {";", 1}, *def_arg_sep_ptr[] = {&def_arg_sep, NULL};
static php_http_params_token_t def_val_sep = {"=", 1}, *def_val_sep_ptr[] = {&def_val_sep, NULL};
switch (ZEND_NUM_ARGS()) {
case 4:
zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("param_sep"), param_sep TSRMLS_CC);
+ /* no break */
case 3:
zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("arg_sep"), arg_sep TSRMLS_CC);
+ /* no break */
case 2:
zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("val_sep"), val_sep TSRMLS_CC);
+ /* no break */
}
if (zparams) {
switch (Z_TYPE_P(property)) {
case IS_NULL:
array_init(property);
- /* fallthrough */
+ /* no break */
case IS_ARRAY:
Z_ADDREF_P(value);
if (!offset) {
#include <php_variables.h>
#include <ext/spl/spl_array.h>
-#include <zend_interfaces.h>
#ifdef PHP_HTTP_HAVE_ICONV
# undef PHP_ATOM_INC
#include "php_http_api.h"
#include <ext/spl/spl_observer.h>
-#include <ext/spl/spl_iterators.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)
{
#include "php_http_api.h"
#include <curl/curl.h>
-#include <ext/standard/php_string.h>
-#include <ext/spl/spl_iterators.h>
static int php_http_request_datashare_compare_handles(void *h1, void *h2);
#include "php_http_api.h"
-#include <ext/standard/php_string.h>
#include <ext/spl/spl_observer.h>
/*
#include "php_http_api.h"
-#include <ext/spl/spl_iterators.h>
-
PHP_HTTP_API php_http_request_pool_t *php_http_request_pool_init(php_http_request_pool_t *h, php_http_request_pool_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
{
php_http_request_pool_t *free_h = NULL;
#include "php_http_api.h"
-#include <SAPI.h>
-#include <ext/standard/php_string.h>
-
static inline char *localhostname(void)
{
char hostname[1024] = {0};
/* .. at the end */
ptr[1] = '\0';
}
- /* fallthrough */
+ /* no break */
default:
/* something else */
default:
zval_dtor(strct);
array_init(strct);
+ /* no break */
case IS_ARRAY:
case IS_OBJECT:
INIT_PZVAL_ARRAY((&arr), HASH_OF(strct));
+ break;
}
} else {
INIT_PZVAL(&arr);