This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Airflow webserver emits malformed HTTP Response Status Line when endpoint/resource is not found #29167
Closed
1 of 2 tasks
Labels
affected_version:2.3
Issues Reported for 2.3
area:webserver
Webserver related Issues
Can't Reproduce
The problem cannot be reproduced
kind:bug
This is a clearly a bug
pending-response
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
Our app is using Airflow 2.3.2 and running the Airflow webserver. My team won't be able to upgrade to the latest airflow version for a long time, so logging the bug against airflow version v2.3.2.
The issue: when accessing a non-existing endpoint, the airflow web server returns a malformed HTTP status line:
HTTP/1.1 b'404 Not Found'
. Note the "b" in front of the message and the single quotes surrounding the text - this is invalid in HTTP status line.This breaks HTTP client's ability to parse the response.
What you think should happen instead
Airflow web server must return a valid HTTP status line, such as
How to reproduce
Make an HTTP request to a non-existent endpoint. Using wget - note the ERROR message printed by wget:
ERROR -1: Malformed status line
Operating System
Ubuntu 5.10
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else
This bug appears to be isolated to the 404 NOT FOUND case. Here is another wget session which solicits the 400 BAD REQUEST response which is properly formatted and doesn't have the
b'
in front of the message. Note that this request passes an invalid query arg to api/v1/connections in order to coerce the 400 BAD REQUEST:Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: