HTTP Client mistakenly send unicode in request start line and headers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Moovida |
Fix Released
|
Undecided
|
Ugo Riboni |
Bug Description
To reproduce:
- using the ElisaHttpClient
- attach callback and errback and wait
What happens:
- either you get back a response with an http 408 (timed out) code after a while, or
- neither the callback nor the errback are ever called and you're stuck waiting forever
The issue is that we send down to the server the unicode objects as-is.
This is in violation of the HTTP specification (http://
Besides being in violation of the spec, the server will never recognize the CR+LF that should terminate the first line so it will keep waiting for it (or timeout with a 408, depening on the implementation).
tags: | removed: http |
Changed in elisa: | |
assignee: | nobody → Ugo Riboni (uriboni) |
milestone: | none → bug-fixing-day |
status: | New → In Progress |
status: | In Progress → Fix Committed |
Changed in elisa: | |
milestone: | bug-fixing-day → 1.0.8 |
Changed in moovida: | |
status: | Fix Committed → Fix Released |
Note that the API documentation of the request method explicitely requires str objects, not unicode (http:// www.moovida. com/documentati on/api/ elisa.plugins. http_client. http_client. ElisaHttpClient -class. html#request).
Note that there was also a failing unit test for the HTTP client that had been commented out until someone would take the time to understand the issue, which you did.
I'm not sure this should be considered as a bug, the documentation being clear about the expected value types.