Content-Length 0 in HTTP plugin responses
Bug #1152707 reported by
Máximo Cuadros
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
In Progress
|
High
|
palik |
Bug Description
The HTTP plugin allways response with a 0 bytes length header instead of the body length as expected.
Regards and thanks.
Example:
$gearmand --http-port 1111 -r http
$ cat /tmp/req
POST /reverse HTTP/1.1
Content-Length: 12
Hello world!
$ netcat localhost 1111 < /tmp/req
HTTP/1.0 200 OK
X-Gearman-
X-Gearman-Command: GEARMAN_
Content-Length: 0
Server: Gearman/1.1.5
!dlrow olleH
Versions:
gearman: stable 1.1.5
boost: stable 1.53.0 (bottled, HEAD
libevent: stable 2.0.21, HEAD
ossp-uuid: stable 1.6.2
$ uname -a
Darwin mc-air 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-
Related branches
lp://staging/~1-infe-w/gearmand/1.0
Ready for review
for merging
into
lp://staging/gearmand
- Tangent Trunk: Pending requested
-
Diff: 82 lines (+22/-5) (has conflicts)2 files modifiedlibgearman-server/plugins/protocol/http/protocol.cc (+14/-4)
libgearman-server/plugins/queue/libmemcached/queue.cc (+8/-1)
lp://staging/~1-infe-w/gearmand/gearmand
Ready for review
for merging
into
lp://staging/gearmand
- Tangent Trunk: Pending requested
-
Diff: 84 lines (+16/-8)3 files modifieddocs/Makefile (+3/-0)
libgearman-server/plugins/protocol/http/protocol.cc (+8/-6)
libgearman-server/plugins/queue/libmemcached/queue.cc (+5/-2)
To post a comment you must log in.
Unable to reproduce on trunk on Ubuntu raring, though its got some other weird effect:
$ telnet localhost 8999 localdomain.
Trying ::1...
Connected to localhost.
Escape character is '^]'.
POST /reverse HTTP/1.1
Content-Length: 12
Hello world! Job-Handle: H:clint- MacBookPro: 5 COMMAND_ WORK_COMPLETE
!dlrow olleH OK
X-Gearman-
X-Gearman-Command: GEARMAN_
Content-Length: 12
Server: Gearman/1.1.6
!dlrow olleH
Notice that instead of the appropriate HTTP response code, '200 OK', its the result followed by OK.