HTTP Content-Length: 0

Bug #1324683 reported by Jeff Fillmore on 2014-05-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calling job with curl. Get no content-length set on response. From php and nodejs the job works correctly. I've dumped the return data and it is correct.

curl --data '{"sessionId":"7ov8h862mhqpsilga4e4i3eet5"}' http://localhost:8080/getUserData_client -v

> POST /getUserData_client HTTP/1.1
> User-Agent: curl/7.37.0
> Host:
> Accept: */*
> Content-Length: 42
> Content-Type: application/x-www-form-urlencoded
* upload completely sent off: 42 out of 42 bytes
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< X-Gearman-Job-Handle: H:ip-10-249-4-167:43
< Content-Length: 0
< Server: Gearman/1.0.6
* Excess found in a non pipelined read: excess = 1133 url = /getUserData_client (zero-length body)
* Closing connection 0

I believe if the content-lenght should be set to 1133 as it looks like curl is complaining about the excess found.

I don't see any where in php to set content-length or any other options for http other than port.

chjgcn (chjgcn) wrote :

Use the latest version(1.1.12), and patch it with the patch file posted in
then it may solve your problem.

chjgcn (chjgcn) wrote :

The newer patch file is in
I forgot to add <cstring> header file into

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers