protomaps-leaflet icon indicating copy to clipboard operation
protomaps-leaflet copied to clipboard

Version 3.1.1 Stops sending range header

Open aswarcewicz opened this issue 1 year ago • 4 comments

I don't know exactly why, but I see that range header was present in requests in version 3.1.0 but after update to 3.1.1 this header has gone

aswarcewicz avatar May 02 '24 18:05 aswarcewicz

What is the full URL you are requesting with any query parameters?

The logic changed for how it automatically detects if it should treat a string as a PMTiles or a ZXY url.

It used to be checking for ending with .pmtiles, but now it strips off params like foo.pmtiles?abc=123

bdon avatar May 03 '24 00:05 bdon

Just GET on /api/map-tiles/map.pmtiles Without query params

aswarcewicz avatar May 03 '24 17:05 aswarcewicz

Does your URL start with http: or https:?

bdon avatar May 04 '24 07:05 bdon

Https (TLS secured)

aswarcewicz avatar May 04 '24 12:05 aswarcewicz

Can you create a minimal reproduction page?

bdon avatar May 05 '24 01:05 bdon

Sorry I don't have a minimal reproduction but just a +1 that I am experiencing this as well. With 3.1.1 the requests don't have a range header and try to fetch the entire file 😅 . It is working perfectly fine on 3.1.0 though.

wginsberg avatar May 07 '24 16:05 wginsberg

What is your complete, exact URL you are fetching from?

bdon avatar May 08 '24 01:05 bdon

I'm fetching from https://pub-5ba95de8cc2f4dada22bfe563b284734.r2.dev/20230918-z12.pmtiles Not sure if it matters either way but I am proxying the request through localhost in development

wginsberg avatar May 08 '24 14:05 wginsberg

Yes, how are you specifying the URL passed to leafletLayer? Because the form of that string needs to be checked to determine whether it's a ZXY URL or a .pmtiles URL.

bdon avatar May 08 '24 14:05 bdon

The URL being passed to leaflet layer was /proxy/20230918-z12.pmtiles. I'm seeing now that http://localhost:3000/proxy/20230918-z12.pmtiles does work 🎊

wginsberg avatar May 08 '24 15:05 wginsberg

It should be fixed in v3.1.2, can you please check?

bdon avatar May 09 '24 02:05 bdon

@bdon looks like both work with 3.1.2 👍

wginsberg avatar May 09 '24 15:05 wginsberg

Thanks for checking, closing!

bdon avatar May 10 '24 06:05 bdon