note 120317 added to oauth.getrequestheader
| From: | me at chrishowie dot com | Date: | Mon, 12 Dec 2016 22:03:37 +0000 |
| Subject: | note 120317 added to oauth.getrequestheader | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-208571@lists.php.net to get a copy of this message | ||
The documentation does not specify the difference between passing a string and passing an array for
the third parameter. We spent two days debugging before reading the C source code to figure out
that there is a significant and undocumented difference between the two.
"a=1" and array("a" => 1) are handled very differently!
If you are making a POST/PUT request (or anything with an entity body) then you should pass that as
a string.
If you are making a request with a query string, you should pass that as an associative array.
If you pass "a=1" intending that to specify the query string, the generated signature will
be invalid -- it will process this as if you were POSTing the content "a=1" instead.
----
Server IP: 72.52.91.14
Probable Submitter: 108.210.238.217
----
Manual Page -- http://php.net/manual/en/oauth.getrequestheader.php
Edit -- https://master.php.net/note/edit/120317
Del: integrated -- https://master.php.net/note/delete/120317/integrated
Del: useless -- https://master.php.net/note/delete/120317/useless
Del: bad code -- https://master.php.net/note/delete/120317/bad+code
Del: spam -- https://master.php.net/note/delete/120317/spam
Del: non-english -- https://master.php.net/note/delete/120317/non-english
Del: in docs -- https://master.php.net/note/delete/120317/in+docs
Del: other reasons-- https://master.php.net/note/delete/120317
Reject -- https://master.php.net/note/reject/120317
Search -- https://master.php.net/manage/user-notes.php