diff options
Diffstat (limited to 'header.c')
| -rw-r--r-- | header.c | 16 |
1 files changed, 1 insertions, 15 deletions
| @@ -32,11 +32,7 @@ | |||
| 32 | #include "SAPI.h" | 32 | #include "SAPI.h" |
| 33 | #include "php_variables.h" | 33 | #include "php_variables.h" |
| 34 | 34 | ||
| 35 | #if 1 //PHP_VERSION_ID >= 50300 | ||
| 36 | static int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) = NULL; | 35 | static int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) = NULL; |
| 37 | #else | ||
| 38 | static int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC) = NULL; | ||
| 39 | #endif | ||
| 40 | 36 | ||
| 41 | char *suhosin_encrypt_single_cookie(char *name, int name_len, char *value, int value_len, char *key TSRMLS_DC) | 37 | char *suhosin_encrypt_single_cookie(char *name, int name_len, char *value, int value_len, char *key TSRMLS_DC) |
| 42 | { | 38 | { |
| @@ -190,20 +186,14 @@ char *suhosin_cookie_decryptor(TSRMLS_D) | |||
| 190 | 186 | ||
| 191 | /* {{{ suhosin_header_handler | 187 | /* {{{ suhosin_header_handler |
| 192 | */ | 188 | */ |
| 193 | #if 1 //PHP_VERSION_ID >= 50300 | ||
| 194 | int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) | 189 | int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) |
| 195 | #else | ||
| 196 | int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC) | ||
| 197 | #endif | ||
| 198 | { | 190 | { |
| 199 | int retval = SAPI_HEADER_ADD, i; | 191 | int retval = SAPI_HEADER_ADD, i; |
| 200 | char *tmp; | 192 | char *tmp; |
| 201 | 193 | ||
| 202 | #if 1 //PHP_VERSION_ID >= 50300 | ||
| 203 | if (op != SAPI_HEADER_ADD && op != SAPI_HEADER_REPLACE) { | 194 | if (op != SAPI_HEADER_ADD && op != SAPI_HEADER_REPLACE) { |
| 204 | goto suhosin_skip_header_handling; | 195 | goto suhosin_skip_header_handling; |
| 205 | } | 196 | } |
| 206 | #endif | ||
| 207 | 197 | ||
| 208 | if (sapi_header && sapi_header->header) { | 198 | if (sapi_header && sapi_header->header) { |
| 209 | 199 | ||
| @@ -294,11 +284,7 @@ int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct | |||
| 294 | suhosin_skip_header_handling: | 284 | suhosin_skip_header_handling: |
| 295 | /* If existing call the sapi header handler */ | 285 | /* If existing call the sapi header handler */ |
| 296 | if (orig_header_handler) { | 286 | if (orig_header_handler) { |
| 297 | #if 1 //PHP_VERSION_ID >= 50300 | ||
| 298 | retval = orig_header_handler(sapi_header, op, sapi_headers TSRMLS_CC); | 287 | retval = orig_header_handler(sapi_header, op, sapi_headers TSRMLS_CC); |
| 299 | #else | ||
| 300 | retval = orig_header_handler(sapi_header, sapi_headers TSRMLS_CC); | ||
| 301 | #endif | ||
| 302 | } | 288 | } |
| 303 | 289 | ||
| 304 | return retval; | 290 | return retval; |
