Changeset 19255 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2024-11-12T18:37:19+01:00 (4 days ago)
Author:
stoecker
Message:

fix URL joining for WMTS when URL comes from capabilities and doesn't end in a separation, fix #23980

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSCapabilities.java

    r13839 r19255  
    2525     */
    2626    public WMTSCapabilities(String baseUrl, TransferMode transferMode) {
    27         this.baseUrl = baseUrl;
     27        if (!baseUrl.endsWith("?") && !baseUrl.endsWith("&") && !baseUrl.endsWith("/")) {
     28            this.baseUrl = baseUrl + (baseUrl.contains("?") ? "&" : "?");
     29        } else {
     30            this.baseUrl = baseUrl;
     31        }
    2832        this.transferMode = transferMode;
    2933    }
Note: See TracChangeset for help on using the changeset viewer.