It took me a minute to spot the difference, and I even was starting down the
wrong path. It's fairly simple:

In your first case, the URL being requested is *actually*
http://127.0.0.1:8080/somefile.w/index

Your controller is getting a request for the index method for a controller
named somefile.w and is processing it (likely due to using  _default).

In the second case, you are requesting the file somefile.p and TG removes
the extension from the filename, since that's used as part of the way that
TG sends the request to a specific method.

It's very much expected behavior. It might not be desirable in your case,
though. What's your end goal? Maybe we can help find a solution that meets
that goal. We'll try, anyway.

On Fri, Sep 23, 2011 at 5:36 PM, Erni Wogernom <[email protected]>wrote:

> Hi all,
>
>  After upgrading to tg2.1 I stumble on the following problem: using
> URL with dot character in it sometime lead to unexpected results. Here
> is my controller code:
>
>
>    @expose()
>    def fs(self, *args, **kw):
>            print args, kw
>
> when I access it with http://127.0.0.1:8080/fs/somefile.w - I am
> getting expected output:
>
>  ('somefile.w',) {}
>
>
> but some url's with '.' in it does not works like that. For example if
> I using http://127.0.0.1:8080/fs/somefile.p -  I am getting this
> output (notice the absence of '.p' part):
>
> ('somefile',) {}
>
>
>  Is this expected behavior? Or am I doing something wrong?
>
>  Thank you in advance,
>
> Erni.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>


-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], AIM/pedermj022171
          Yahoo/pedermj2002, MSN/[email protected]
My Online Resume: http://www.icelus.org/
Twitter: pedersentg

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to