Welcome! Log In Create A New Profile

Advanced

Nginx, SOAP and POST redirect

October 05, 2015 01:21AM
Hello,

I use nginx as frontend for some soap service. This service actually works with CWMP protocol, what is based on soap. I mean, that I have session, that consists of sequence of HTTP POST requests and responses, where body contains SOAP.

It's important, that I can use only POST requests to communicate with client. And there is a problem, that some clients has broken browsers (most of the clients, actually) and it's not way to fix them quickly. And I want to use redirects in this soap session (I mean 307 redirects) But, unfortunately, some clients don't support redirects, because they are broken. I know that there are some way to make nginx handling redirects instead of the clients. I know about error_page, x-accel-redirect, subrequests in nginx, echo module and other stuff. But all this methods have significant disadvantages, mostly because they were designed for GET requests, not for the POST.

For example, there is a question about doing redirect in nginx the way I want: http://serverfault.com/questions/423265/how-to-follow-http-redirects-inside-nginx I tried it, but it turns my POST request into GET request and I loose the body. It' may be connected with this: https://en.wikipedia.org/wiki/Post/Redirect/Get

There is another example, where are mentioned another methods to achieve what I want: http://forum.nginx.org/read.php?2,254664,254664#msg-254664 But, again, it's not clear how to use it if I want POST requests only

By the way, redirect may be not what I need. Exactly I need following:

1. Client sends to me first message in the session.
2. I answer with 401 (because I need authentication)
3. Client sends to me the same message, but with authentication header
4. I need to get the same first message third time, but on the another URL.

Module ngx_http_auth_request_module is doing something close to what I want, but, again, it has issues with POST method.

So, I don't know what to do. Maybe there are any hope that nginx can help me or I should rely on another ways to do it? Or I should forget about doing redirects?

Please, help
Subject Author Posted

Nginx, SOAP and POST redirect

router_master October 05, 2015 01:21AM

Re: Nginx, SOAP and POST redirect

Anonymous User October 05, 2015 04:50AM

Re: Nginx, SOAP and POST redirect

Francis Daly October 05, 2015 06:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready