about use post method to request the static page

Nick Pearson nick.pearson at gmail.com
Mon Dec 1 17:38:13 MSK 2008

For me I wanted this so that forms on my sites could be posted to the same
URL that was used to request the page.  Specifically, I didn't want the user
to be taken to a different URL when there were form post errors, and I
didn't want the server to issue a redirect back to the original URL to show
an error message to the user.
For example, if the user is at mysite.com/contact and submits a form without
filling out a required field, I wanted the user to remain at that location
while viewing the error message and without a redirect.  The only way I knew
to do this was to set the form's action attribute to the "static" page's
location (the current URL) and have nginx do a pass-through for form posts.

I should mention that my requirements might be different from what Dennis
Cao (?) is trying to do.  I've written a content management system that
caches pages at the request path when it receives "get" requests, so
although my contact page is "static", it may or may not exist before the
request is made.  As such, even for this static page, the "get" request may
be passed through to the CMS anyway.

And because I wanted my application to have complete control over how "post"
requests are handled, I configured nginx to pass all post requests through
to the application regardless of the URL that was posted to.

On Mon, Dec 1, 2008 at 8:24 AM, Igor Sysoev <is at rambler-co.ru> wrote:

> On Mon, Dec 01, 2008 at 08:58:42PM +0800, ?? ???p wrote:
> > hiya :
> >  Now I use the Nginx 7.x +tomcat 6.x
> >  I have some application should use post method to request  tge static
> page
> >  but always filed  i use the httpwatch to catch the package ,I find the
> url give the 405 code
> > what should I do?
> > thanks
> What should static page do with a POST request ?
> --
> Igor Sysoev
> http://sysoev.ru/en/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20081201/0186f6b5/attachment.html>

More information about the nginx mailing list