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/MapPaintStyles.java

    r6830 r6867  
    1010import java.util.Arrays;
    1111import java.util.Collection;
     12import java.util.HashSet;
    1213import java.util.LinkedList;
    1314import java.util.List;
     15import java.util.Set;
    1416import java.util.concurrent.CopyOnWriteArrayList;
    1517
     
    217219        MirroredInputStream in = null;
    218220        try {
    219             in = new MirroredInputStream(entry.url);
     221            Set<String> mimes = new HashSet<String>();
     222            mimes.addAll(Arrays.asList(XmlStyleSource.XML_STYLE_MIME_TYPES.split(", ")));
     223            mimes.addAll(Arrays.asList(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES.split(", ")));
     224            in = new MirroredInputStream(entry.url, null, Utils.join(", ", mimes));
    220225            String zipEntryPath = in.findZipEntryPath("mapcss", "style");
    221226            if (zipEntryPath != null) {
Note: See TracChangeset for help on using the changeset viewer.