[Zope3-dev] form action
Guido van Rossum
guido@python.org
Tue, 02 Apr 2002 09:58:33 -0500
[Steve Alexander, in a checkin comment]
> Converted tabs to spaces.
Thanks!
> Changed action="" to action="." so that it works with Zope3 in cvs.
>
> This is because the browser was going to a page foo/bar/index.html
> and seeing a form with action="".
>
> On submitting the form, the URL goes in place of the action.
> The Zope publisher gets a request for foo/bar/index.html, with the
> request to call a method "preview" (for example). So, the publisher
> was trying to traverse to foo/bar/index.html/preview, which fails of
> course.
Hm, strange. I don't understand why "." vs. "" makes any difference.
If the effective url is foo/bar/index.html, it should send the request
to "foo/bar/." or "foo/bar/", not to "foo/bar/index.html".
In fact, in my browser (NS 4.78) it doesn't make a difference. What
browser were you using?
> Perhaps what the publisher should say is: if I'm traversing, and I
> can't traverse any further, but I've got a method from a form, I
> should back up one step then traverse the method.
>
> If that were implemented, then action="" and action="." should work
> the same.
Base HREF insertion sucks. I believe we'll be able to avoid almost
all cases -- but not yet.
--Guido van Rossum (home page: http://www.python.org/~guido/)