projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
header cleanups; fix IDE warnings
[m6w6/ext-http]
/
php_http_message.c
diff --git
a/php_http_message.c
b/php_http_message.c
index 12c189e8656dd6a1f1df37e1ec1f21f2a17aa5f8..d6a7f755c76b73e0b6a6719f5ac1d42b80d222b1 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-6,17
+6,11
@@
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-201
0
, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-201
1
, 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>
-#include <ext/spl/spl_iterators.h>
-#include <Zend/zend_interfaces.h>
+#include "php_http_api.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_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
{
@@
-149,7
+143,7
@@
PHP_HTTP_API zval *php_http_message_header(php_http_message_t *msg, char *key_st
zval *ret = NULL, **header;
char *key = php_http_pretty_key(estrndup(key_str, key_len), key_len, 1, 1);
zval *ret = NULL, **header;
char *key = php_http_pretty_key(estrndup(key_str, key_len), key_len, 1, 1);
- if (SUCCESS == zend_
hash
_find(&msg->hdrs, key, key_len + 1, (void *) &header)) {
+ if (SUCCESS == zend_
symtable
_find(&msg->hdrs, key, key_len + 1, (void *) &header)) {
if (join && Z_TYPE_PP(header) == IS_ARRAY) {
zval *header_str, **val;
HashPosition pos;
if (join && Z_TYPE_PP(header) == IS_ARRAY) {
zval *header_str, **val;
HashPosition pos;
@@
-1392,10
+1386,10
@@
PHP_METHOD(HttpMessage, setHeader)
}
if (!zvalue) {
}
if (!zvalue) {
- zend_
hash
_del(&obj->message->hdrs, name, name_len + 1);
+ zend_
symtable
_del(&obj->message->hdrs, name, name_len + 1);
} else {
Z_ADDREF_P(zvalue);
} else {
Z_ADDREF_P(zvalue);
- zend_
hash
_update(&obj->message->hdrs, name, name_len + 1, &zvalue, sizeof(void *), NULL);
+ zend_
symtable
_update(&obj->message->hdrs, name, name_len + 1, &zvalue, sizeof(void *), NULL);
}
efree(name);
}
}
efree(name);
}
@@
-1441,7
+1435,7
@@
PHP_METHOD(HttpMessage, addHeader)
convert_to_array(header);
zend_hash_next_index_insert(Z_ARRVAL_P(header), &zvalue, sizeof(void *), NULL);
} else {
convert_to_array(header);
zend_hash_next_index_insert(Z_ARRVAL_P(header), &zvalue, sizeof(void *), NULL);
} else {
- zend_
hash
_update(&obj->message->hdrs, name, name_len + 1, &zvalue, sizeof(void *), NULL);
+ zend_
symtable
_update(&obj->message->hdrs, name, name_len + 1, &zvalue, sizeof(void *), NULL);
}
efree(name);
}
}
efree(name);
}