Forums

411 Client Error. Pythonanywhere stripping my content-length header somewhere?

I'm getting the following error when making calls to my flask app.

raise requests.HTTPError(http_error_msg, response=response)
requests.exceptions.HTTPError: 411 Client Error: Length Required for url: https://www.space-track.org/ajaxauth/login

The error doesn't show up when I'm testing the flask app locally, only when I make a call to it while it's running on pythonanywhere. I'm running the app in a venv on pythonanywhere and I've double checked the relevant packages and they're all using the same versions.

Any idea what changes on pythonanwhere to cause the 411 error? I'm not sure how to debug this.

Can you show a code snippet where you create the request so we could try to reproduce it? If you don't want to show it here, you may send us an emial at support@pythonanywhere.com.