FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » who is changing dots into underscores in my variable names in REST?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: who is changing dots into underscores in my variable names in REST? [message #169706 is a reply to message #169704] Thu, 23 September 2010 16:47 Go to previous messageGo to previous message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma:
Senior Member
In news:0193eacf-5ced-412f-9b2d-f012e14e317e(at)i17g2000vbq(dot)googlegroups(dot)com,
jrobinss <julien(dot)robinson2(at)gmail(dot)com> typed:
> Hi all,
>
> I searched high and low for a precise answer to this
> question, and haven't found, so here goes.
>
> I have a REST web service written in PHP (installation:
> Wamp with PHP
> 5.3.0).
> Whether it receives
> http://foo.bar/service?first.second=glob
> or else
> http://foo.bar/service?first_second=glob
> it does exactly the same: it thinks it's receiving
> first_second.
>
> Basically, dots are changed into underscores in the
> variable name before being dispatched.
>
>
> I understand that it happens, and I can live with it. But I
> can't find any documentation about this, which bothers me.
> }:-[
>
>
> This is what I found...
>
> http://php.net/manual/en/reserved.variables.get.php
> "The GET variables are passed through urldecode(). "
>
> However I ran a simple test, and urldecode() doesn't
> replace dots with underscores. :-(
>
> I also understand that PHP may (magically) enforce filters
> http://www.php.net/manual/en/filter.filters.php
>
> I tested a number of them (with default settings), and also
> couldn't find anything that changes "." to "_".
>
>
> Here's the question: would anyone have a link that
> documents this? Thanks

I think you'll find that's happening in your browser or whatever s handling
your http; iits replacing what it considers illegal characters (which those
are) to an underscore. If yuo actually want a space in a URL you have to
code it as %20 and so on.

HTH,

Twayne`
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What's in this cookie?
Next Topic: Re: Can anyone recommend a good debugger & IDE for PHP?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 08:27:34 GMT 2024

Total time taken to generate the page: 0.04561 seconds