Intermittent BadStatusLine('Hello world!HTTP/1.1 200 OK\r\n') when executing test-suite
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-requests-unixsocket (Ubuntu) |
Fix Released
|
Undecided
|
Dan Bungert |
Bug Description
When executing the test suite, sometimes the following exception gets raised:
E requests.
This looks bad. According to the test definition, the string "Hello world!" is supposed to be the body of the HTTP response. And somehow it appears before the status line.
We noticed this issue after uploading 0.3.0-3ubuntu1 because the package FTBFS [1] (three times out three). So Launchpad builders seem very good at reproducing the issue (that said my PPA build was green). That being said, the issue seems unrelated to the patch included in 0.3.0-3ubuntu1.
I've been able to reproduce the exception without the patch, and also on a mantic system.
Steps to reproduce:
$ git ubuntu clone python-
$ cd python-
$ while python3 -m pytest requests_
It can take many iterations until the issue occurs. At this point I don't know yet if the issue is specific to requests-unixsocket or if it is a src:requests bug instead (or maybe something else like python-waitress?).
description: | updated |
tags: | added: update-excuse |
Changed in python-requests-unixsocket (Ubuntu): | |
status: | In Progress → Fix Committed |
After debugging a bit, I speculate that what is happening the test send several requests to one socket, the HEAD request may not read the body (why would it?), then unread bytes (why does it return a body from a HEAD request?) look like an out-of-order write.