Ignore:
Timestamp:
2015-02-02T21:29:41+01:00 (10 years ago)
Author:
donvip
Message:

fix #11061 - Remote API imagery cookies parameter is not handled properly (patch by p.janaszek)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java

    r30900 r30933  
    1414    private Map<String, String> headers = new HashMap<>();
    1515
     16    public static final String COOKIE_HEADER   = "Cookie";
    1617    public static final String PATTERN_ZOOM    = "\\{(?:(\\d+)-)?z(?:oom)?([+-]\\d+)?\\}";
    1718    public static final String PATTERN_X       = "\\{x\\}";
     
    3435    public TemplatedTMSTileSource(String name, String url, String id, int minZoom, int maxZoom) {
    3536        super(name, url, id, minZoom, maxZoom);
     37        handleTemplate();
     38    }
     39
     40    public TemplatedTMSTileSource(String name, String url, String id, int minZoom, int maxZoom, String cookies) {
     41        super(name, url, id, minZoom, maxZoom);
     42        if (cookies != null) {
     43            headers.put(COOKIE_HEADER, cookies);
     44        }
    3645        handleTemplate();
    3746    }
Note: See TracChangeset for help on using the changeset viewer.