gearman with http, bad request line , gearmand die
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Gearman |
Undecided
|
Unassigned |
Bug Description
gearmand -L 127.0.0.1 --http-port 8080 -r http
telnet 127.0.0.1 8080
input any content, like "aaa"
gearmand log, dont stop have:
bad request line aaa
to memory out
Related branches
- Tangent Trunk: Pending requested 2014-12-17
-
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)
- Tangent Trunk: Pending requested 2015-09-15
-
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)
chjgcn (chjgcn) wrote : | #1 |
jiaofuyou (jiaofuyou) wrote : | #2 |
sorry, your gearmand-
gearman http POST reture is NULL
gearman log:
DEBUG 2014-08-11 04:49:21.416779 [ 2 ] Sending HTTP response: Content-length:0 data_size:8 gearmand_
data_size:8 //it is OK
Content-length:0 //it is Error
chjgcn (chjgcn) wrote : | #3 |
I have posted a newer patch file in
https:/
and the protocol 'HTTP' will work perfectly,
jiaofuyou (jiaofuyou) wrote : | #4 |
your newest gearmand patch file is where?
https:/
[root@localhost gearmand-1.1.12]# patch -p0 < ../gearmand-
patching file libgearman/add.cc
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/run.cc
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman/
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file libgearman-
patching file tests/libgearma
patching file util/instance.cc
--- ...
chjgcn (chjgcn) wrote : | #5 |
add the line below into libgearman/check.cc :
#include <cstring>
chjgcn (chjgcn) wrote : | #6 |
The <cstring> header file should be added in to libgearman/
The patch file posted here also contains other bug fixes and functionality enhancements which may be usefull for you.
palik (1-infe-w) wrote : | #7 |
Is currently anyone working on gearman 1.1.12? Last commit was done on 2014-02-15 21:44:23
The patched bug fixes are not in http://
Is it any other branch?
description: | updated |
palik (1-infe-w) wrote : | #8 |
gearman 1.0 contains the bug too.
bug fixing proposed in
https:/
palik (1-infe-w) wrote : | #9 |
gearman 1.1.12 bug fix
http://
You can open file libgearman- server/ plugins/ protocol/ http/protocol. cc , find 'bad request line:' and 'bad method:', then chang 'GEARMAND_SUCCESS' to 'GEARMAND_ INVALID_ PACKET' after them. This way is quick for this bug.
You can also use my patch file here, but the patch file contains other patches for bug fixes and/or better support of SSL connection, planed job and HTTP protocol. Read these links below for details: /bugs.launchpad .net/gearmand/ +bug/1338861 /bugs.launchpad .net/gearmand/ +bug/1352411 /answers. launchpad. net/gearmand/ +question/ 252097
https:/
https:/
https:/