Hello!

Suppose a form is located at an URL http://host.com/path/to/form and the form's action path is relative, like this: <form action="path/to/form" ...>. If I submit this form, the WWW::Mechanize will POST the data to http://host.com/path/to/path/to/form which seems right at the first glance but
compared to what real browsers are doing is wrong.
The Internet Explorer and FireFox both submit the data to http://host.com/path/to/form, treating the form's action path absolute. I could not find the specification on how the form's action should be treated but it seems that if there is a slash in the action, then it should be treated as absolute.

For example, the registration form located at http://www.flurl.com/user/join has the action="user/join". If I submit this form using a browser, the data is posted to http://www.flurl.com/user/join, but if I submit it using Mech, the data is posted to http://www.flurl.com/user/user/join.


P.Krumins

Reply via email to