Ignore:
Timestamp:
2014-02-18T00:35:15+01:00 (10 years ago)
Author:
Don-vip
Message:

fix #9715 - Set HTTP Accept header to expected MIME types when downloading presets, styles, plugins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java

    r6643 r6867  
    3535public class XmlStyleSource extends StyleSource implements StyleKeys {
    3636
     37    /**
     38     * The accepted MIME types sent in the HTTP Accept header.
     39     * @since 6867
     40     */
     41    public static final String XML_STYLE_MIME_TYPES = "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
     42
    3743    protected final Map<String, IconPrototype> icons = new HashMap<String, IconPrototype>();
    3844    protected final Map<String, LinePrototype> lines = new HashMap<String, LinePrototype>();
     
    98104    @Override
    99105    public InputStream getSourceInputStream() throws IOException {
    100         MirroredInputStream in = new MirroredInputStream(url);
     106        MirroredInputStream in = new MirroredInputStream(url, null, XML_STYLE_MIME_TYPES);
    101107        InputStream zip = in.findZipEntryInputStream("xml", "style");
    102108        if (zip != null) {
Note: See TracChangeset for help on using the changeset viewer.