EIDA / mediatorws

EIDA NG Mediator/Federator web services
GNU General Public License v3.0
6 stars 6 forks source link

HTTP status code 413 on eidaws-wfcatalog request #117

Closed damb closed 4 years ago

damb commented 4 years ago

The following request returns HTTP status code 413:

$ curl -v -o - "http://localhost:5000/eidaws/wfcatalog/1/query?sta=EPOS&start=2018-01-01&end=2018-01-02"
*   Trying ::1:5000...
* TCP_NODELAY set
* connect to ::1 port 5000 failed: Connection refused
*   Trying 127.0.0.1:5000...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET /eidaws/wfcatalog/1/query?sta=EPOS&start=2018-01-01&end=2018-01-02 HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.66.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
< HTTP/1.0 413 REQUEST ENTITY TOO LARGE
< Content-Type: text/plain; charset=utf-8
< Content-Length: 286
< Access-Control-Allow-Origin: *
< Server: Werkzeug/0.16.0 Python/3.6.9
< Date: Wed, 26 Feb 2020 19:20:58 GMT
< 

Error 413: Request too large

Request too large

Usage details are available from http://www.fdsn.org/webservices/

Request:
http://localhost:5000/eidaws/wfcatalog/1/query?sta=EPOS&start=2018-01-01&end=2018-01-02

Request Submitted:
2020-02-26T19:20:58.278414

Service version:
0.10.0

However, the request should not hit the configured request limits and thus should either return HTTP status code 200 (including a valid result) or HTTP status code 204 (or rather 404, respectively).

Thanks to @jbienkowski for pointing this out.

damb commented 4 years ago

The bug is reproducible. Apparently, this issue occurs when no valid result could be federated at all.

Note, that a valid route was returned:

$ curl -q -o - "http://eida-federator.ethz.ch/eidaws/routing/1/query?service=wfcatalog&sta=EPOS&start=2018-01-01&end=2018-01-02"
http://www.orfeus-eu.org/eidaws/wfcatalog/1/query
TU EPOS -- BHE 2018-01-01T00:00:00 2018-01-02T00:00:00
TU EPOS -- BHN 2018-01-01T00:00:00 2018-01-02T00:00:00
TU EPOS -- BHZ 2018-01-01T00:00:00 2018-01-02T00:00:00

EDIT: Note also that all resources are affected by this bug.

damb commented 4 years ago

Closed with 8e9229fd7a8e8ef5246f1b523e757fcdea17d255.