prepared for libevent2 usage in config.w32, though libevent usage seems to be broken...
[m6w6/ext-http] / php_http_header_parser.c
index e0dea5babf3e5987b678756696e2cc46c9d04e44..8636ed3867b05d7b1583bf4ce5ff5fdbf51dd43c 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2013, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -26,7 +26,6 @@ static const php_http_header_parser_state_spec_t php_http_header_parser_states[]
                {PHP_HTTP_HEADER_PARSER_STATE_DONE,                     0}
 };
 
-
 PHP_HTTP_API php_http_header_parser_t *php_http_header_parser_init(php_http_header_parser_t *parser TSRMLS_DC)
 {
        if (!parser) {
@@ -39,7 +38,6 @@ PHP_HTTP_API php_http_header_parser_t *php_http_header_parser_init(php_http_head
        return parser;
 }
 
-
 PHP_HTTP_API php_http_header_parser_state_t php_http_header_parser_state_push(php_http_header_parser_t *parser, unsigned argc, ...)
 {
        va_list va_args;
@@ -155,7 +153,7 @@ PHP_HTTP_API STATUS php_http_header_parser_parse(php_http_header_parser_t *parse
 
 #define SET_ADD_VAL(slen, eol_len) \
        do { \
-               char *ptr = buffer->data; \
+               const char *ptr = buffer->data; \
                size_t len = slen; \
                 \
                while (len > 0 && PHP_HTTP_IS_CTYPE(space, *ptr)) { \