projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
use the new params parser
[m6w6/ext-http]
/
php_http_message.c
diff --git
a/php_http_message.c
b/php_http_message.c
index 12c189e8656dd6a1f1df37e1ec1f21f2a17aa5f8..a99a0bb2ecf42ca70e7ab45c4f6379e480b5d62d 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-6,12
+6,10
@@
| 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 "php_http.h"
#include <main/SAPI.h>
@@
-149,7
+147,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
+1390,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
+1439,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);
}