When the apache_request_headers function is used, the header associative array is not normalized to the Upper-Case-Style.
http://code.google.com/p/oauth-php/source/browse/trunk/library/OAuthRequestLogger.php#285
I think just removing the 'return' stmt (and the ksort) should do the trick..?
Comment #1
Posted on Feb 7, 2011 by Massive Lionhmmm... I don't get the bug. ksort should not change anything, just sort the keys alphabetically. And apache_request_headers() already returns the data in Upper-Case-Style.
Comment #2
Posted on Feb 8, 2011 by Happy BirdWith the following test script:
curl -H 'authorization: Foo' http://any.any/test.php Array ( [User-Agent] => curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18 [Host] => any.any [Accept] => / [authorization] => Foo )
note the lowercase 'authorization' header. So what you'r saying about apache_request_headers() returning the keys in uppercase style is not true..? I have php version 5.3.3
Comment #3
Posted on Feb 8, 2011 by Massive LionThis issue was closed by revision r185.
Comment #4
Posted on Feb 8, 2011 by Massive LionYour request was made with authorization in lowercase. Apache does not guarantee Upper-Case-Style (unlike I said before, my mistake: http://php.net/manual/en/function.apache-request-headers.php).
But now I get your bug and your patch. Yes, removing those 2 lines does the trick and fixes the problem (r185). Thanks!
Status: Fixed
Labels:
Type-Defect
Priority-Medium