Ok,
So I confirm that the HTTP params parser used by rack in ruby doesn't deal
well with 2 paramswith the same name. (at least not like expected).

So, I did a small middleware to fix that, and superfeedr's hub should now
deal with both ways pretty well :)
Here is the fix for anyone else using ruby :http://gist.github.com/213940

Paddy, I think you can test again... sorry for all that trouble!

Ju

--
Julien Genestoux,

http://twitter.com/julien51
http://superfeedr.com

+1 (415) 254 7340
+33 (0)9 70 44 76 29


On Mon, Oct 19, 2009 at 3:02 PM, Jay Rossiter <[email protected]> wrote:

>
>     Most of these quirks are holdovers from the days when register_globals
> was commonly used.  Since ., -, and many other non-word chars aren't valid
> in variable names, they were all converted to _.
>
>     The "must use arrays in POST keys" is simply a result of Rasmus being
> bullheaded.  (http://bugs.php.net/bug.php?id=16195)
>
>     "No, until such a time that a browser exists where [] doesn't work, I
> see no reason to change anything.  Standards mean very little on the web.
> Most of the web is completely non-standard as it is."
>
>
> On 10/19/2009 1:23 PM, Pádraic Brady wrote:
>
> PHP has a few "clever" and "helpful" features. For example, a posted
> hub.verify is accessed as $_POST['hub_verify']. Besides Jay's observation,
> it also munges the period character into an underscore during parsing. I
> believe it does the same thing for a few other characters. So yes, self
> implemented parsing is almost a given for protocols like Pubsubhubbub.
> Normal web apps design around all this by force of habit - it's surprising
> how many PHP developers aren't even aware it's a problem...
>
> I really love PHP, but it can try even my patience sometimes ;).
>
> Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.survivethedeepend.com
> OpenID Europe Foundation Irish Representative<http://www.openideurope.eu/>
>
>
>  ------------------------------
> *From:* Jay Rossiter <[email protected]> <[email protected]>
> *To:* "[email protected]" <[email protected]>
> <[email protected]> <[email protected]>
> *Sent:* Mon, October 19, 2009 8:47:19 PM
> *Subject:* [pubsubhubbub] Re: hub.verify - clarification on repeated
> keywords/parameters?
>
> On 10/19/2009 9:12 AM, Brett Slatkin wrote:
>
> Python's CGI module will give you back a set of key/list pairs, with
> the values listed in the order they appeared in the string.
> Query-string encoding does enough variable munging that we shouldn't
> have to add yet another level of parsing on top of that, which is why
> we're going with #1. How hard is it to make this work right in PHP for
> clients?
>
>
>
>     The issue with PHP is their inane refusal to natively support repeated
> parameters.   Repeated parameters must be passed in an array format.
>
>     hub.verify[]=sync&hub.verify[]=async
>
>     If passed in a normally specified way (hub.verify=&hub.verify=) .. the
> latter parameters simply overwrite the former.  Variable stomping.
>
>     You have to fread "php://input" (the raw POST stream) and parse it into
> variables on your own.
>
>
> --
>
> Jay Rossiter | Software Engineer/System Administrator
> Pioneering RSS Advertising Solutions
>
> [email protected] | Phone: 503.896.6187 | Fax: 503.235.2216
> Website: www.pheedo.com | RSS: www.pheedo.info/index.xml
>
>
>
> --
>
> Jay Rossiter | Software Engineer/System Administrator
> Pioneering RSS Advertising Solutions
>
> [email protected] | Phone: 503.896.6187 | Fax: 503.235.2216
> Website: www.pheedo.com | RSS: www.pheedo.info/index.xml
>

<<pheedo.gif>>

Reply via email to