- we pass the file name as char* not zval* in http_etag() and http_last_modified()
[m6w6/ext-http] / http_auth_api.c
index a2c54ae56f20f986e05f4163b22a1ca9d9d8056e..5e5bafc07ef3e6387800b494cd341961bc715a15 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
-#include "ext/standard/base64.h"
 
 #include "SAPI.h"
+#include "ext/standard/base64.h"
 
 #include "php_http.h"
 #include "php_http_api.h"
@@ -61,7 +60,7 @@ PHP_HTTP_API STATUS _http_auth_basic_credentials(char **user, char **pass TSRMLS
                HTTP_GSC(zauth, "HTTP_AUTHORIZATION", FAILURE);
                {
                        int decoded_len;
-                       char *colon, *decoded = php_base64_decode(Z_STRVAL_P(zauth), Z_STRLEN_P(zauth), &decoded_len);
+                       char *colon, *decoded = (char *) php_base64_decode((const unsigned char *) Z_STRVAL_P(zauth), Z_STRLEN_P(zauth), &decoded_len);
 
                        if (colon = strchr(decoded + 6, ':')) {
                                *user = estrndup(decoded + 6, colon - decoded - 6);