Bug Report #4336

Request/Response header support broken

Added by Woody Gilk about 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:11/17/2011
Priority:NormalDue date:
Assignee:Sam de Freyssinet% 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

#1 Updated by Jim K almost 3 years 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'),

#2 Updated by Woody Gilk almost 3 years 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

#3 Updated by Woody Gilk almost 3 years ago

  • Target version set to Unscheduled

#4 Updated by Sam de Freyssinet almost 3 years ago

I assume you're referring to Kohana 3.1 as 3.2 does not parse headers in this way?

#5 Updated by Woody Gilk almost 3 years 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.

Also available in: Atom PDF