You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Markus <t....@proventis.net> on 2009/01/29 15:50:55 UTC

possible bug in SitemapSource

hi,

mimetype detection in in 
org.apache.cocoon.components.source.impl.SitemapSource seems not 
correct. field mimetype is initialized in init(). at this time the 
mimetype is not valid (always null). i modified getMimeType() (see below).

found in 2.1.7 , 2.1.8 , 2.1.11 , 2.2.0

public String getMimeType() {
    if (this.mimeType == null) {
        if (this.environment != null)
            this.mimeType = this.environment.getContentType();
        else if (this.redirectSource != null)
            this.mimeType = this.redirectSource.getMimeType();
    }
    return this.mimeType;
}

regards
thomas