From 76b8f30659ee437bb3258f206aa994dd3c875541 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Wed, 23 Apr 2008 16:00:06 +0000 Subject: [PATCH] new test for webPhar with phar.extract_list --- ext/phar/phar_object.c | 3 +++ ext/phar/tests/webphar_plainmap.phpt | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ext/phar/tests/webphar_plainmap.phpt diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 62a4698167..8df06f3f56 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -371,6 +371,9 @@ nofile: } /* }}} */ +/* post-process REQUEST_URI and retrieve the actual request URI. This is for + cases like http://localhost/blah.phar/path/to/file.php/extra/stuff + which calls "blah.phar" file "path/to/file.php" with PATH_INFO "/extra/stuff" */ static void phar_postprocess_ru_web(char *fname, int fname_len, char **entry, int *entry_len, char **ru, int *ru_len TSRMLS_DC) /* {{{ */ { char *e = *entry + 1, *u = NULL, *u1 = NULL, *saveu = NULL; diff --git a/ext/phar/tests/webphar_plainmap.phpt b/ext/phar/tests/webphar_plainmap.phpt new file mode 100644 index 0000000000..ba14c92c7a --- /dev/null +++ b/ext/phar/tests/webphar_plainmap.phpt @@ -0,0 +1,25 @@ +--TEST-- +Phar: Phar::webPhar with phar.extract_list +--SKIPIF-- + +--INI-- +phar.readonly=1 +--FILE-- +getMessage() . "\n"; +} +?> +--CLEAN-- + +--EXPECT-- +Cannot use Phar::webPhar() from an extracted phar archive, simply use the extracted files directly \ No newline at end of file -- 2.50.1