"Fossies" - the Fresh Open Source Software Archive

Member "mod_perl-2.0.11/ModPerl-Registry/t/404-filename-with-newline.t" (5 Oct 2019, 501 Bytes) of package /linux/www/apache_httpd_modules/mod_perl-2.0.11.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!perl
    2 
    3 use strict;
    4 use warnings FATAL => 'all';
    5 
    6 use Apache::Test;
    7 use Apache::TestUtil;
    8 use Apache::TestRequest qw(GET_RC);
    9 
   10 plan tests => 1, need 'mod_alias.c';
   11 
   12 {
   13     # this used to result in 500 due to a combination of Perl warning about
   14     # a newline in the filename passed to stat() and our
   15     #   use warnings FATAL=>'all'
   16 
   17     t_client_log_error_is_expected();
   18     my $url = '/registry/file%0dwith%0anl%0d%0aand%0a%0dcr';
   19     ok t_cmp GET_RC($url), 404, 'URL with \\r and \\n embedded';
   20 }