On Wed, Dec 23, 2015 at 7:10 PM, Руслан Закиров [email protected] wrote:
On Wed, Dec 23, 2015 at 6:49 PM, Maxim D. [email protected] wrote:
X-Accel-Redirect changes a request from POST to GET.
No, it doesn’t. Getting request method POST on the backend and even form
data is intact.
Output from the psgi app (updated gist with data dumper):
127.0.0.1 - - [23/Dec/2015:19:05:46 +0300] “POST /a/ HTTP/1.0” 200 0 “-”
“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36
(KHTML,
like Gecko) Chrome/47.0.2526.106 Safari/537.36”
{
CONTENT_LENGTH => 7,
CONTENT_TYPE => ‘application/json, application/x-www-form-urlencoded’,
HTTP_ACCEPT => ‘/’,
HTTP_ACCEPT_ENCODING => ‘gzip, deflate’,
HTTP_ACCEPT_LANGUAGE => ‘en-US,en;q=0.8,ru;q=0.6’,
HTTP_CACHE_CONTROL => ‘no-cache’,
HTTP_CONNECTION => ‘close’,
HTTP_HOST => ‘127.0.0.1:5000’,
HTTP_ORIGIN => ‘chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm’,
HTTP_PRAGMA => ‘no-cache’,
HTTP_USER_AGENT => ‘Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106
Safari/537.36’,
PATH_INFO => ‘/b/’,
QUERY_STRING => ‘’,
REMOTE_ADDR => ‘127.0.0.1’,
REMOTE_PORT => 56137,
REQUEST_METHOD => ‘POST’,
REQUEST_URI => ‘/b/’,
SCRIPT_NAME => ‘’,
SERVER_NAME => 0,
SERVER_PORT => 5000,
SERVER_PROTOCOL => ‘HTTP/1.0’,
‘psgi.errors’ => *::STDERR,
‘psgi.input’ => bless( *{‘Stream::Buffered::PerlIO::$io’},
‘FileHandle’
),
‘psgi.multiprocess’ => ‘’,
‘psgi.multithread’ => ‘’,
‘psgi.nonblocking’ => ‘’,
‘psgi.run_once’ => ‘’,
‘psgi.streaming’ => 1,
‘psgi.url_scheme’ => ‘http’,
‘psgi.version’ => [
1,
1
],
‘psgix.harakiri’ => 1,
‘psgix.input.buffered’ => 1,
‘psgix.io’ => bless( *Symbol::GEN5, ‘IO::Socket::INET’ )
}
x=y&y=z
127.0.0.1 - - [23/Dec/2015:19:05:46 +0300] “POST /b/ HTTP/1.0” 200 22
“-”
“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36
(KHTML,
like Gecko) Chrome/47.0.2526.106 Safari/537.36”