Bug Report #4336
Request/Response header support broken
| Status: | Closed | Start date: | 11/17/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Core | |||
| Target version: | - | |||
| Resolution: | invalid | Points: | 1 |
Description
HTTP_Header does not properly parse some headers. For example, try the following:
$header = 'OAuth oauth_consumer_key="XX", oauth_token="XX", oauth_version="1.0", oauth_timestamp="1321565109", oauth_nonce="XX", oauth_signature_method="HMAC-SHA1", oauth_signature="XX"';
$request->headers('Authorization', $header);
echo Debug::vars($request);
This is a perfectly valid header, but does not get parsed correctly.
History
Updated by Jim K 6 months ago
According to http://tools.ietf.org/html/rfc2616#page-31 :
message-header = field-name ":" [ field-value ]
In your example there is no colon after the field name ('OAuth'),
Updated by Woody Gilk 6 months ago
Yes it does. The complete header would be:
Authorization: OAuth oauth_consumer_key="XX", oauth_token="XX", oauth_version="1.0", oauth_timestamp="1321565109", oauth_nonce="XX", oauth_signature_method="HMAC-SHA1", oauth_signature="XX"
This is the format defined by http://tools.ietf.org/html/rfc5849#section-3.5.1
Updated by Woody Gilk 4 months ago
- Target version set to Unscheduled
Updated by Sam de Freyssinet 4 months ago
I assume you're referring to Kohana 3.1 as 3.2 does not parse headers in this way?
Updated by Woody Gilk 4 months ago
- Status changed from New to Closed
- Target version deleted (
Unscheduled) - Resolution set to invalid
I should have put more information into the original issue. Now I can't figure out how to replicate this.
Closing until I can remember what this is actually about.