Forum: NGINX Nginx Webdav & POST method

584c245823a490cababf93729fcaa043?d=identicon&s=25 unknown (Guest)
on 2013-10-16 11:53
(Received via mailing list)
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
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2013-10-16 13:14
(Received via mailing list)
Hello!

On Wed, Oct 16, 2013 at 11:53:20AM +0200, smainklh@free.fr 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 Dounin
http://nginx.org/en/donation.html
584c245823a490cababf93729fcaa043?d=identicon&s=25 unknown (Guest)
on 2013-10-16 13:33
(Received via mailing list)
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 Dounin" <mdounin@mdounin.ru>
À: nginx@nginx.org
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, smainklh@free.fr 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 Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2013-10-16 13:35
(Received via mailing list)
Hello!

On Wed, Oct 16, 2013 at 01:32:19PM +0200, smainklh@free.fr 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 Dounin
http://nginx.org/en/donation.html
584c245823a490cababf93729fcaa043?d=identicon&s=25 unknown (Guest)
on 2013-10-16 14:09
(Received via mailing list)
Thanks Maxim,
I'll contact their support in order to understand its behavior.

See you,
Smana

----- Mail original -----
De: "Maxim Dounin" <mdounin@mdounin.ru>
À: nginx@nginx.org
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, smainklh@free.fr 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 Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
34011bc56457235a2caa5ed1d4a29f3c?d=identicon&s=25 Jonathan Matthews (Guest)
on 2013-10-16 15:41
(Received via mailing list)
On 16 Oct 2013 13:09, <smainklh@free.fr> 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 ;-)

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
584c245823a490cababf93729fcaa043?d=identicon&s=25 unknown (Guest)
on 2013-10-16 15:51
(Received via mailing list)
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 :p

Regards,
Smana


----- Mail original -----
De: "Jonathan Matthews" <contact@jpluscplusm.com>
À: nginx@nginx.org
Envoyé: Mercredi 16 Octobre 2013 15:40:42
Objet: Re: Nginx Webdav & POST method





On 16 Oct 2013 13:09, < smainklh@free.fr > 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 ;-)

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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.