HTTP status code 411: Length Required. Emitted when a request needed to include a Content-Length header, but did not.
Questions tagged [http-status-code-411]
30 questions
77
votes
9 answers
Why I get 411 Length required error?
This is how I call a service with .NET:
var requestedURL = "https://accounts.google.com/o/oauth2/token?code=" + code + "&client_id=" + client_id + "&client_secret=" + client_secret + "&redirect_uri=" + redirect_uri +…

markzzz
- 47,390
- 120
- 299
- 507
18
votes
1 answer
HTTP Status Code 411 - Length Required
I try to get data from server. I use NSURLConnectionDelegate, NSURLConnectionDataDelegate. There is code (Objective - C).
-(void)sendRequest
{
NSURL* url = [[NSURL alloc] initWithString:@"http://SomeServer"];
NSMutableURLRequest* request =…

WantToKnow
- 1,767
- 2
- 12
- 18
3
votes
1 answer
How to POST with application/x-www-form-urlencoded header and URLSearchParams using isomorphic-fetch
This is a CURL example which works fine:
curl --request POST \
--url \
--header 'authorization: Bearer ' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'category=1&userId='
I'm trying…

rfc1484
- 9,441
- 16
- 72
- 123
3
votes
1 answer
SVN: DAV request failed: 411 Content length required. http-chunked-requests
When I try to checkout project from SVN I got the following error
RA layer request failed
svn: DAV request failed: 411 Content length required. The server or an intermediate proxy does not accept chunked encoding. Try setting…

AZ_
- 21,688
- 25
- 143
- 191
3
votes
1 answer
Android DefaultHttpClient POST method Can't set Content Length, getting Http Error 411
I am having problem with an HttpPost on Android 4.2. I am trying to call an authentication service that is hosted in a .NET WebAPI service.
The service requires that the request be made as a POST method, and that several custom request headers be…

David Fekke
- 399
- 2
- 5
- 13
3
votes
1 answer
nginx proxy_pass of PUT with no Content-Length header returns 411
I am having trouble with nginx proxy_pass and PUT without a Content-Length header returning a 411 error.
What I run to test this:
# curl -XPUT http://localhost:8080/
411 Length Required

Nick Palmer
- 2,589
- 1
- 25
- 34
2
votes
0 answers
GDrive Upload API returns 411 (Length Required) HTML response instead of JSON response
I'm getting this HTML response for GDrive upload API even after setting the Content-Length as part of the request headers. Ideally this API should return JSON response on failure.
The same code works properly for file upload 90% of the…

Bharath PS
- 163
- 5
2
votes
2 answers
Nodejs lambda request function gets 411 Length Required
I use a node.js lambda that makes post requests to remote api, which installed on several remote locations.
I have no access to the remote api code or logs.
The lambda gets called with HTTP gateway by external application which I do not control as…

matisa
- 497
- 3
- 25
2
votes
1 answer
411 - length required error while posting json data using PHP curl
I am trying to post json data to the GCM (Google Cloud Messaging) server using php curl. Below is my code…

saish neugi
- 63
- 1
- 7
2
votes
2 answers
error 411 Length Required c++, libcurl PUT request
Even though I set in header Content-Lenght I'm getting 411 error. I'm trying to send PUT request.
struct curl_slist *headers = NULL;
curl = curl_easy_init();
std::string paramiters =
…

user3082058
- 45
- 7
1
vote
1 answer
411 Length Required error while calling POST Rest endpoint with out request body (using feign client)
I want to request another POST endpoint which accepts no request body . when I am calling that using feign client like this :
@FeignClient(name = "Client" , url = "${URL}" , configuration = Configuration.class)
public interface FeignClient…

user21362390
- 11
- 1
1
vote
1 answer
FeignClient 411 content-length
I use feign client to get an object from my provider with an object query: doGet(User u); Then an exception occurs: feign.FeignException$FeignClientException: [411 Length Required] during [GET] to ...
This exception does not always happen, sometimes…

linkin_w92
- 11
- 2
1
vote
0 answers
AWS ALB returns 411 after ELB classic switch over
I have a new ALB that has requests logging as 411 or "Length Required" that were previously 200 OK when the requests went to an old ELB classic. The requests are on loop from the source in another VPC out of my control and haven't been changed.…

DomRow
- 169
- 3
- 12
1
vote
1 answer
HTTP/1.1 411 Length Required on REST API Post call from Azure API Management Service
curl -kvs -X POST https://xxxx-xxxx.azure-api.net/*******/reports -k -H "account: ********" -H "Ocp-Apim-Subscription-Key: ***********"
on making this curl, i'm getting the error message as HTTP/1.1 411 Length Required.
I know we can fix this by…

samridhi gupta
- 23
- 1
- 5
1
vote
1 answer
Azure Stack API Rest create storage account with CURL in PHP
I try to create a storage account in my Azure Stack with curl in a PHP site but unfortunately I always receive a error "HTTP Error 411. The request must be chunked or have a content length.".
I have put ""Content-Length: 0,"" or the correct number…

kent2004
- 59
- 6