relies on php_base64_encode).
free_alloca(old_cwd);
}
+PHPAPI int php_handle_auth_data(const char *auth SLS_DC)
+{
+ int ret = -1;
+
+ if (auth && auth[0] != '\0'
+ && strncmp(auth, "Basic ", 6) == 0) {
+ char *pass;
+ char *user;
+
+ user = php_base64_decode(auth + 6, strlen(auth) - 6, NULL);
+ if (user) {
+ pass = strchr(user, ':');
+ if (pass) {
+ *pass++ = '\0';
+ SG(request_info).auth_user = user;
+ SG(request_info).auth_password = estrdup(pass);
+ ret = 0;
+ } else {
+ efree(user);
+ }
+ }
+ }
+ return ret;
+}
+
PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC)
{
zend_op_array *op_array;
PHPAPI int php_handle_special_queries(SLS_D PLS_DC);
PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC);
+PHPAPI int php_handle_auth_data(const char *auth SLS_DC);
extern void php_call_shutdown_functions(void);