Nginx Webdav & POST method

Hello,

We have an appliance which trying to perform POST methods against the
Nginx server.
However this doesn’t seem to be supported.
Could you please confirm me that ?
And is there a workaround in order to allow POST requests ?

Regards,
Smana

Hello!

On Wed, Oct 16, 2013 at 11:53:20AM +0200, [email protected] wrote:

We have an appliance which trying to perform POSTmethods against the Nginx
server.
However this doesn’t seem to be supported.
Could you please confirm me that ?
And is there a workaround in order to allow POST requests ?

POST requests are more or less undefined in WebDAV (apart from
relatively new RFC5995, which defines a discovery mechanism
through which servers can advertise support for POST requests with
“add collection member” semantics).

What do you expect to happen on POST with WebDAV resources?


Maxim D.
http://nginx.org/en/donation.html

Thank you Maxim,

Actually it’s a video encoding appliance which seems to push files with
POST request.
Please find below the error logs :

2013/10/16 09:19:14 [error] 17204#0: *237 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“PROPFIND /864/ HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:19:27 [error] 17204#0: *253 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“PROPFIND /864/ HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:20:23 [error] 17204#0: *282 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“OPTIONS /864/ HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:20:33 [error] 17204#0: *283 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“OPTIONS /864/ HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:20:38 [error] 17204#0: *284 user “(” was not found in
“/etc/nginx/.864_htpasswd”, client: x.x.x.x, server: localhost, request:
“OPTIONS /864/ HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:20:39 [error] 17204#0: *285 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“POST /864/index1_00001.ts HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:20:39 [error] 17204#0: *286 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“OPTIONS /864/ HTTP/1.1”, host: “95.81.159.200”

2013/10/16 09:20:39 [error] 17204#0: *287 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“POST /864/index2_00001.ts HTTP/1.1”, host: “x.x.x.x”

2013/10/16 09:20:41 [error] 17204#0: *288 no user/password was provided
for basic authentication, client: x.x.x.x, server: localhost, request:
“POST /864/index1_00001.ts HTTP/1.1”, host: “x.x.x.x”

Don’t take care of the authentication issue, that’s another issue.

Smana

----- Mail original -----
De: “Maxim D.” [email protected]
À: [email protected]
Envoyé: Mercredi 16 Octobre 2013 13:13:53
Objet: Re: Nginx Webdav & POST method

Hello!

On Wed, Oct 16, 2013 at 11:53:20AM +0200, [email protected] wrote:

We have an appliance which trying to perform POST methods against the Nginx
server.
However this doesn’t seem to be supported.
Could you please confirm me that ?
And is there a workaround in order to allow POST requests ?

POST requests are more or less undefined in WebDAV (apart from
relatively new RFC5995, which defines a discovery mechanism
through which servers can advertise support for POST requests with
“add collection member” semantics).

What do you expect to happen on POST with WebDAV resources?


Maxim D.
http://nginx.org/en/donation.html


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Hello!

On Wed, Oct 16, 2013 at 01:32:19PM +0200, [email protected] wrote:

Actually it’s a video encoding appliance which seems to push files with
POSTrequest.

It seems that appliance needs to be fixed to properly use WebDAV,
there is the PUT method to put files.


Maxim D.
http://nginx.org/en/donation.html

Thanks Maxim,
I’ll contact their support in order to understand its behavior.

See you,
Smana

----- Mail original -----
De: “Maxim D.” [email protected]
À: [email protected]
Envoyé: Mercredi 16 Octobre 2013 13:35:13
Objet: Re: Nginx Webdav & POST method

Hello!

On Wed, Oct 16, 2013 at 01:32:19PM +0200, [email protected] wrote:

Actually it’s a video encoding appliance which seems to push files with
POST request.

It seems that appliance needs to be fixed to properly use WebDAV,
there is the PUT method to put files.


Maxim D.
http://nginx.org/en/donation.html


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Lol, thanks Jonathan.
I’ll let you know what the devs will reply to this issue.

You’re right, this should be done from their side as Nginx is rfc
compliant ^^

But your hack can be usefull under certain circumtances :stuck_out_tongue:

Regards,
Smana

----- Mail original -----
De: “Jonathan M.” [email protected]
À: [email protected]
Envoyé: Mercredi 16 Octobre 2013 15:40:42
Objet: Re: Nginx Webdav & POST method

On 16 Oct 2013 13:09, < [email protected] > wrote:

Thanks Maxim,
I’ll contact their support in order to understand its behavior.

If you discover that it does indeed use POSTs in an nginx-incompatible
way, you could use nginx to hack the request into something usable. [ NB
I’d only do this for an absolutely immutable appliance; in any other
situation I’d personally tell the devs their code was broken and we
couldn’t help: don’t inherit other people’s technical debt without a
commitment to a fix! ]

There’s a directive (proxy_method?) which changes the verb when used in
a proxy_pass’d context.

You could just have a double pass through nginx, with the
publicly-listening server{} solely being responsible for doing
s/POST/PUT/ , before proxy_pass’ing to the actual webdav server via a
127.0.0.0/8 address. Use a map to define the verb, I suggest.

If it’s not clear from the above how to do this, let me know and I’ll
run up a test and guide you towards some config. I suggest it’s not very
difficult to do, however :wink:

Yes, this is an utterly horrible hack. No, I have never used it in
production. Yes, there is an lie hidden in this paragraph.

Cheers,
Jonathan


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

On 16 Oct 2013 13:09, [email protected] wrote:

Thanks Maxim,
I’ll contact their support in order to understand its behavior.

If you discover that it does indeed use POSTs in an nginx-incompatible
way,
you could use nginx to hack the request into something usable. [ NB I’d
only do this for an absolutely immutable appliance; in any other
situation
I’d personally tell the devs their code was broken and we couldn’t help:
don’t inherit other people’s technical debt without a commitment to a
fix! ]

There’s a directive (proxy_method?) which changes the verb when used in
a
proxy_pass’d context.

You could just have a double pass through nginx, with the
publicly-listening server{} solely being responsible for doing
s/POST/PUT/
, before proxy_pass’ing to the actual webdav server via a
127.0.0.0/8address. Use a map to define the verb, I suggest.

If it’s not clear from the above how to do this, let me know and I’ll
run
up a test and guide you towards some config. I suggest it’s not very
difficult to do, however :wink:

Yes, this is an utterly horrible hack. No, I have never used it in
production. Yes, there is an lie hidden in this paragraph.

Cheers,
Jonathan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs