atom feed6 messages in ru.sysoev.nginxRe: rewrite POST into GET?
FromSent OnAttachments
Mark SlaterFeb 14, 2008 2:12 am 
Kenneth DemanawaFeb 14, 2008 3:46 am 
Igor SysoevFeb 14, 2008 6:00 am.txt
Mark SlaterFeb 14, 2008 5:13 pm 
Igor SysoevFeb 14, 2008 10:28 pm 
Mark SlaterFeb 20, 2008 2:38 am 
Subject:Re: rewrite POST into GET?
From:Igor Sysoev (is-G@public.gmane.org)
Date:Feb 14, 2008 10:28:51 pm
List:ru.sysoev.nginx

On Thu, Feb 14, 2008 at 05:13:57PM -0800, Mark Slater wrote:

Wow Igor, that was fast! Thank you!

I downloaded the development version of nginx (I'd been using the previous stable version 0.5.35), and applied the patch. Unfortunately, when I started the new version of the server, the post_to_static didn't change the 405 result sent back to facebook.

My configuration file looks like this:

http { ... server { listen 8080; server_name localhost;

# set the max size for file uploads to 50 MB. client_max_body_size 50M;

#charset koi8-r;

access_log logs/host.vhost.access.log main; root /usr/local/webapps/listage/current/public;

if (-f $document_root/system/maintenance.html) { rewrite ^(.*)$ /system/maintenance.html last; break; post_to_static on; }

location / { ... } } }

Do I have that right?

I was wrong - the configuration should be changed to:

server {

...

if (-f $document_root/system/maintenance.html) { rewrite ^(.*)$ /system/maintenance.html break; break; }

location = /system/maintenance.html { post_to_static on; }