GEOFON / fdsnws_scripts

Scripts for working with (EIDA) FDSN web services
GNU Lesser General Public License v3.0
4 stars 3 forks source link

Unsupported content type in fdsnws_fetch.py (version "2022.017") #10

Closed pdibartolomeo closed 3 months ago

pdibartolomeo commented 3 months ago

Hello, when fdsnws_fetch.py tries to fetch stationxml metadata from https://webservices.ingv.it/fdsnws it fails and reports: getting data from https://webservices.ingv.it/fdsnws/station/1/query failed: unsupported content type 'text/xml' I then changed the line elif content_type == "application/xml": into elif content_type in ["application/xml", "text/xml"]: and it solved the problem. Is this content-type INGV is using legal?

To reproduce the error: fdsnws_fetch.py -v -N 'MN' -y station -q level=response -o MN.xml

Regards

Paolo Di Bartolomeo

javiquinte commented 3 months ago

Hi @pdibartolomeo ! Thanks for pointing this out. I'll open an issue on EIDA's userfeedback issue tracker, as this is a response type that does not follow the specification. It has nothing to do with fdsnws_fetch. You can use your modified version of the code in the meantime. Thanks again!

javiquinte commented 3 months ago

Please follow the evolution in the issue opened in userfeedback https://github.com/EIDA/userfeedback/issues/161