SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

MAX_CONTENT_LENGTH doesn't behave as expected. #260

Closed lboeman closed 4 years ago

lboeman commented 4 years ago

When uploading data a 413 should be returned when exceeding the value in bytes. This configuration only valid when parsing form data, and not an arbitrary json request body (See https://github.com/pallets/flask/issues/2690). Gunicorn does not have a way to handle this either. Although inefficient we will have to manually check the header and return a response, that way we can respond with an error in the same json format for consistency.

lboeman commented 4 years ago

closed in #261