Modify ↓
#23011 closed defect (fixed)
Custom http headers aren't applied on custom imagery sources
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | 23.06 |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Add a custom TMS source. In my case it's
https://pkk.rosreestr.ru/GISWebServiceSE/service.php?SERVICE=WMTS&REQUEST=GetTile&VERSION=3.0.0&LAYER=PKKm&STYLE=default&TILEMATRIXSET=GoogleMapsCompatible&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image%2Fpng
, one may usehttps://ngw.fppd.cgkipd.ru/tile/56/{z}/{x}/{y}.png
which doesn't require installing a custom TLS certificate. - Modify
customHttpHeaders
in corresponding entry inAdvanced preferences > imagery.entries
to{"User-Agent":"Mozilla/5.0 (JOSM)"}
What is the expected result?
Custom header in GET request to TMS server.
What happens instead?
Requests ignore headers set in customHttpHeaders
and are still sent with default user-agent:
2023-06-18 20:45:53.151 FINE: REQUEST HEADERS: {Accept=text/html, image/png, image/jpeg, image/gif, */*, Accept-Encoding=gzip, deflate, User-Agent=JOSM/1.5 (18746 en_GB) Mac OS X 12.6.6 Java/17.0.7} 2023-06-18 20:45:53.167 INFO: GET https://pkk.rosreestr.ru/GISWebServiceSE/service.php?SERVICE=WMTS&REQUEST=GetTile&VERSION=3.0.0&LAYER=PKKm&STYLE=default&TILEMATRIXSET=GoogleMapsCompatible&TILEMATRIX=6&TILEROW=34&TILECOL=55&FORMAT=image%2Fpng -> !!! (18 ms)
If however you choose a pre-defined imagery source with custom http headers (like Geoportal 2: Orthophotomap (aerial image) WMTS
for Poland), custom headers are sent correctly.
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-06-02 17:23:29 +0200 (Fri, 02 Jun 2023) Revision:18746 Build-Date:2023-06-03 01:31:02 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18746 en_GB) Mac OS X 12.6.6 OS Build number: macOS 12.6.6 (21G646) Memory Usage: 696 MB / 16384 MB (429 MB allocated, but free) Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: Display 5 2560×1440 (scaling 2.00×2.00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→16×16, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_GB Numbers with default locale: 1234567890 -> 1234567890 Program arguments: [--debug] Dataset consistency test: No problems found Plugins: + reverter (36066) + tageditor (36079) + turnlanes-tagging (0.0.5) + undelete (36066) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1 - https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip Last errors/warnings: - 00065.867 W: java.net.ConnectException: Connection refused - 00068.328 W: JCS - Silent failure during download: https://pkk.rosreestr.ru/GISWebServiceSE/service.php?SERVICE=WMTS&REQUEST=GetTile&VERSION=3.0.0&LAYER=PKKm&STYLE=default&TILEMATRIXSET=GoogleMapsCompatible&TILEMATRIX=15&TILEROW=10109&TILECOL=19784&FORMAT=image%2Fpng - 00172.525 W: java.net.ConnectException: Connection refused - 00172.525 W: Already here java.net.ConnectException: Connection refused - 00208.097 W: java.net.ConnectException: Connection refused - 00215.015 W: java.net.ConnectException: Connection refused - 00215.020 W: java.net.ConnectException: Connection refused - 00215.025 W: java.net.ConnectException: Connection refused - 00225.179 W: java.net.ConnectException: Connection refused - 00396.598 W: java.net.ConnectException: Connection refused
Attachments (0)
Change History (2)
comment:1 by , 21 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 21 months ago
Milestone: | → 23.06 |
---|
Note:
See TracTickets
for help on using tickets.
In 18766/josm: