On Dec 31 2010, 9:00 pm, Steve Mallett <steve.mall...@gmail.com>
wrote:
> Done.  Same results so it must not have been getting in the way.  

It most certainly will have.

> A
> discovery though:
>
> Withhttp://localhost/links/add/http://www.youtube.com/user/EpicMealTime#p...
> echo var_dump($this->params); results:
> array(8) { ["controller"]=> string(5) "links" ["action"]=> &string(3)
> "add" ["named"]=> array(1) { ["http"]=> string(0) "" } ["pass"]=>
> array(3) { [0]=> string(15) "www.youtube.com" [1]=> string(4) "user"
> [2]=> string(12) "EpicMealTime" } ["plugin"]=> NULL ["form"]=>
> array(0) { } ["url"]=> array(1) { ["url"]=> string(49)
> "links/add/http:/www.youtube.com/user/EpicMealTime" } ["models"]=>
> array(1) { [0]=> string(4) "Link" } }
>
> Notice lack of 'foo', but 'url'.

there is no foo in the link you pasted, 'url' is the var cake is using
which cricket refered to earlier.

>
> Also; however, a properly encoded URL breaks both firefox & chrome
> resulting in a 
> 404http://localhost/links/add/https%253A%252F%252Fhootsuite.com%252Flogi...
>
> I think it's getting worse.  /shudder

If you're using apache, mod_rewrite decodes before rewriting - so the
following are identical as received by cake:
http://localhost/links/add/http://www.youtube.com/user...
http://localhost/links/add/https%3A%2F%2Fyoutube.com%2Fuser...

If you double encode - you'll receive it cake side singly encoded.

However, if you're getting a 404 it's most likely because of something
in your app, not cake (check your logs).

An important point which I suspect you haven't considered: You are
never, ever going to receive the anchor (#xyz) on the server. So your
example youtube link is just going to point to the user's page, no the
specific video indicated by the hash args.

If your problem is in anyway "losing data decoding" related - use a
different encoding/decoding method such as base64 - or just don't put
the url in the url (or use javascript to move the url argument to
populate a field in the form, or etc. etc.)

hth,

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to