HTTP Content-Length: 0

Bug #1324683 reported by Jeff Fillmore
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
New
Undecided
Unassigned

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: ec2-50-112-34-244.us-west-2.compute.amazonaws.com:8080
> 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
< X-Gearman-Command: GEARMAN_COMMAND_WORK_COMPLETE
< 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.

Tags: http
Revision history for this message
chjgcn (chjgcn) wrote :

Use the latest version(1.1.12), and patch it with the patch file posted in
    https://bugs.launchpad.net/gearmand/+bug/1352411/comments/4
then it may solve your problem.

Revision history for this message
chjgcn (chjgcn) wrote :

The newer patch file is in
    https://bugs.launchpad.net/gearmand/+bug/1348865/comments/6
I forgot to add <cstring> header file into
    libgearman/interface/universal.hpp

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.