It sounds like we (GeoTools) should accept `text/xml` especially when
requesting getCapabilities documents. But I'm really not sure 403 is the
correct response to not accepting the right content type.

Ian

On Mon, 22 Apr 2024 at 14:03, Peter Smythe <g...@smythe.co.za> wrote:

> With access to Brent's GeoServer, I have managed to reproduce this
> problem, and it appears to be a combination of GeoTools HTTPClient (not
> MultithreadedHttpClient) and the GEBCO *MapServer* not allowing HTTP
> Header "accept": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
> for some reason.
>
> To reproduce:
> In Postman, GET
> https://wms.gebco.net/mapserv?REQUEST=GETCAPABILITIES&VERSION=1.3.0&SERVICE=WMS
> works fine, until the Accept header is changed from the default */* to 
> text/html,
> image/gif, image/jpeg, *; q=.2, */*; q=.2
> Returns 403 Unauthorised
>
> This Accept header appears to only be sent by GeoTools HTTPClient and is
> not sent by the GeoTools MultithreadedHttpClient, which is what I had on by
> default, when the cascaded WMS worked for me on my GeoServer (previous
> email):
>
> [image: image.png]
>  (in GeoServer New WMS Connection)
>
> Is this a GeoTools bug?  Or GeoServer?
>
> And then under what circumstances would the WMS data store fall back to
> the Simple HTTPClient rather than using the MultithreadedHttpClient (HTTP
> connection pooling), even if the above is ticked?
>
> Peter
>
> GeoServer PSC
> AWS Solutions Architect
> https://github.com/petersmythe
>
>
> On Sun, 21 Apr 2024 at 15:19, Peter Smythe <g...@smythe.co.za> wrote:
>
>> Maybe try again, it works for me from GeoServer v2.25.0:
>>
>> [image: image.png]
>>
>> Peter
>>
>> GeoServer PSC
>> AWS Solutions Architect
>> https://github.com/petersmythe
>>
>>
>> On Sun, 21 Apr 2024 at 00:50, Brent Wood via Geoserver-users <
>> geoserver-us...@lists.sourceforge.net> wrote:
>>
>>> Hi,
>>>
>>> I'm looking to install geoserver on a ship.
>>>
>>> I'd like to use the GEBCO WMS service to provide a background map layer,
>>> but cache it locally to avoid internet traffic.
>>>
>>> The capabilities doc is at:
>>>
>>> https://wms.gebco.net/mapserv?REQUEST=GETCAPABILITIES&VERSION=1.3.0&SERVICE=WMS
>>>
>>> The layer I wish to provide is: GEBCO_LATEST_SUB_ICE_TOPO
>>>
>>> I can connect & get the capabilities doc in a browser. I can select &
>>> open the layer in QGIS.
>>>
>>> When I try to set up a WMS store in Geoserver I enter the required
>>> parameters, but get told the connection test to the URL failed with error
>>> 403.
>>>
>>> I understand this means the Gebco server is refusing to reply with the
>>> doc. I'm not sure why the URL works from a browser but fails when sent from
>>> Geoserver, any suggestions appreciated, as far  as I know it is an
>>> identical request, from the same host.
>>>
>>>
>>> Thanks,
>>>
>>>   Brent Wood.
>>>
>>> _______________________________________________
>>> Geoserver-users mailing list
>>>
>>> Please make sure you read the following two resources before posting to
>>> this list:
>>> - Earning your support instead of buying it, but Ian Turton:
>>> http://www.ianturton.com/talks/foss4g.html#/
>>> - The GeoServer user list posting guidelines:
>>> http://geoserver.org/comm/userlist-guidelines.html
>>>
>>> If you want to request a feature or an improvement, also see this:
>>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>>>
>>>
>>> geoserver-us...@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> geoserver-us...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 
Ian Turton
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to