summaryrefslogtreecommitdiff
path: root/header.c
diff options
context:
space:
mode:
authorBen Fuhrmannek2015-01-15 17:09:32 +0100
committerBen Fuhrmannek2015-01-15 17:09:32 +0100
commit5335470004c0e97fd5f4d4a2d0371693cb26fccc (patch)
treeb058967648f7069b5f43a1c23a7c7b8f56460959 /header.c
parent68960966324f4701a1f402e97f17ca7870a317a4 (diff)
removed <5.4 compatibility code
Diffstat (limited to '')
-rw-r--r--header.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/header.c b/header.c
index 1a85015..5229910 100644
--- a/header.c
+++ b/header.c
@@ -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
36static int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) = NULL; 35static int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) = NULL;
37#else
38static int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC) = NULL;
39#endif
40 36
41char *suhosin_encrypt_single_cookie(char *name, int name_len, char *value, int value_len, char *key TSRMLS_DC) 37char *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
194int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) 189int suhosin_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC)
195#else
196int 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
294suhosin_skip_header_handling: 284suhosin_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;