Skip to content

Commit ad9c60f

Browse files
committed
ext/phar: start refactoring phar_postprocess_ru_web()
1 parent 3828b24 commit ad9c60f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/phar/phar_object.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@ static void phar_do_404(phar_archive_data *phar, char *fname, size_t fname_len,
349349
/* post-process REQUEST_URI and retrieve the actual request URI. This is for
350350
cases like http://localhost/blah.phar/path/to/file.php/extra/stuff
351351
which calls "blah.phar" file "path/to/file.php" with PATH_INFO "/extra/stuff" */
352-
static void phar_postprocess_ru_web(const char *fname, size_t fname_len, char **entry, size_t *entry_len, char **ru, size_t *ru_len) /* {{{ */
352+
static void phar_postprocess_ru_web(const char *fname, size_t fname_len, const char *entry, size_t *entry_len, char **ru, size_t *ru_len) /* {{{ */
353353
{
354-
char *e = *entry + 1, *u = NULL, *u1 = NULL, *saveu = NULL;
354+
const char *e = entry + 1;
355+
char *u = NULL, *u1 = NULL, *saveu = NULL;
355356
size_t e_len = *entry_len - 1, u_len = 0;
356357
phar_archive_data *pphar;
357358

@@ -746,7 +747,7 @@ PHP_METHOD(Phar, webPhar)
746747
}
747748

748749
if (entry_len) {
749-
phar_postprocess_ru_web(fname, fname_len, &entry, &entry_len, &ru, &ru_len);
750+
phar_postprocess_ru_web(fname, fname_len, entry, &entry_len, &ru, &ru_len);
750751
}
751752

752753
if (!entry_len || (entry_len == 1 && entry[0] == '/')) {

0 commit comments

Comments
 (0)