HTTPRequest adds unnecessary line separator
Issue #81
resolved
When parsing the POST body, it always adds a line separator to the query, even if it's a single line body (See HTTPRequest line 230 ). This can cause some problems for downstream parsing.
My specific case was I was adding a scope to the TokenRequest, and the HTTPRequest query field ended up looking like (note the \r\n on the end; of course, it's not these characters, but a real line terminator).
grant_type=password&username=testuser&password=testpassword&scope=openid\r\n
even though it was all submitted as a single line without any line delimiter.
Unfortunately, when the TokenRequest is parsed, the value of the Scope became openid\r\n, and then, it wouldn't match when querying the Scope object, since the single key added to the set was openid\r\n
Comments (3)
-
-
-
assigned issue to
- changed status to open
-
assigned issue to
-
- changed status to resolved
Fix is in commit ada6430245dbb4459c13bf858f79fb4096e9c93f.
- Log in to comment
Ran into the same issue. Workaround: