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/tagging/TaggingPresetReader.java

    r6856 r6867  
    3535public final class TaggingPresetReader {
    3636
     37    /**
     38     * The accepted MIME types sent in the HTTP Accept header.
     39     * @since 6867
     40     */
     41    public static final String PRESET_MIME_TYPES = "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
     42   
    3743    private TaggingPresetReader() {
    3844        // Hide default constructor for utils classes
     
    219225    public static Collection<TaggingPreset> readAll(String source, boolean validate) throws SAXException, IOException {
    220226        Collection<TaggingPreset> tp;
    221         MirroredInputStream s = new MirroredInputStream(source);
     227        MirroredInputStream s = new MirroredInputStream(source, null, PRESET_MIME_TYPES);
    222228        try {
    223229            InputStream zip = s.findZipEntryInputStream("xml","preset");
Note: See TracChangeset for help on using the changeset viewer.