Welcome! Log In Create A New Profile

Advanced

proxy_pass of PUT with no Content_length header returns 411

March 20, 2013 06:09PM
I am having trouble with proxy_pass and PUT without a Content-Length header returning a 411 error.

# curl -XPUT http://localhost:8080/
<html>
<head><title>411 Length Required</title></head>
<body bgcolor="white">
<center><h1>411 Length Required</h1></center>
<hr><center>nginx/1.1.19</center>
</body>
</html>
# touch temp
# curl -X PUT http://localhost:8080/ -T temp
{"response": "ok"}
#

Relevant configuration:

# Proxy to Backend Server
server {
listen localhost:8080;

location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://backend_server;
}
}

I found this post which seems to be the same problem: http://forum.nginx.org/read.php?2,72279,72279#msg-72279

Is there a way to get nginx to proxy PUT requests WITHOUT a Content-Length header?
Does a newer version of nginx NOT suffer from this limitation?

Thanks,
~ Nick
SubjectAuthorPosted

proxy_pass of PUT with no Content_length header returns 411

nickpalmerMarch 20, 2013 06:09PM

Re: proxy_pass of PUT with no Content_length header returns 411

Maxim DouninMarch 21, 2013 06:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 100
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 184 on July 08, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready