httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Gajdos <pgaj...@suse.cz>
Subject Re: [users@httpd] failing t/modules/filter.t
Date Tue, 25 Oct 2016 19:48:32 GMT
> On Wed, Sep 21, 2016 at 08:38:25PM +0200, Yann Ylavic wrote:
> > Without any AddType directive relative to ".xml" files in your
> > configuration, the Content-Type is set according to the
> > "conf/mimes.types" file.
> > What's in yours for the "xml" extension?
> 
> You are correct. There is no reference to xml extension in
> t/conf/*.conf or t/conf/mime.types. I will try to check how
> t/conf/mime.types is generated. 

In Apache-Test/lib/Apache/TestConfig.pm, there is:

sub types_config_template {
    return <<EOF;
text/html  html htm
image/gif  gif
image/jpeg jpeg jpg jpe
image/png  png
text/plain asc txt
EOF
}

sub generate_types_config {
    my $self = shift;

    # handle the case when mod_mime is built as a shared object
    # but wasn't included in the system-wide httpd.conf
    $self->find_and_load_module('mod_mime.so');

    unless ($self->{inherit_config}->{TypesConfig}) {
        my $types = catfile $self->{vars}->{t_conf}, 'mime.types';
        unless (-e $types) {
            my $fh = $self->genfile($types);
            print $fh $self->types_config_template;
            close $fh;
        }
        $self->postamble(<<EOI);
<IfModule mod_mime.c>
    TypesConfig "$types"
</IfModule>
EOI
    }
}

So if I understand correctly, content of mime.types is hardcoded.
Is there another chance than patching either TestConfig.pm or
extra.conf.in to contain application/xml .xml definition?

Petr


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message