}
case PHP_HTTP_HEADER_PARSER_STATE_KEY: {
- const char *colon, *eol_str;
- int eol_len;
+ const char *colon, *eol_str = NULL;
+ int eol_len = 0;
if (buffer->data == (eol_str = php_http_locate_bin_eol(buffer->data, buffer->used, &eol_len))) {
/* end of headers */
if ((eol_str = php_http_locate_bin_eol(buffer->data, buffer->used, &eol_len))) {
if (eol_str + eol_len - buffer->data < buffer->used) {
- char *nextline = eol_str + eol_len;
+ const char *nextline = eol_str + eol_len;
if (*nextline == '\t' || *nextline == ' ') {
while (nextline < buffer->data + buffer->used && (*nextline == '\t' || *nextline == ' ')) {
if (parser->_key.str && parser->_val.str) {
zval array, **exist;
+ if (!headers && callback_func) {
+ callback_func(callback_arg, &headers, NULL TSRMLS_CC);
+ }
+
INIT_PZVAL_ARRAY(&array, headers);
php_http_pretty_key(parser->_key.str, parser->_key.len, 1, 1);
if (SUCCESS == zend_symtable_find(headers, parser->_key.str, parser->_key.len + 1, (void *) &exist)) {