Merge lp:~1-infe-w/gearmand/1.0 into lp:gearmand

Proposed by palik on 2014-12-17
Status: Needs review
Proposed branch: lp:~1-infe-w/gearmand/1.0
Merge into: lp:gearmand
Diff against target: 82 lines (+22/-5) (has conflicts)
2 files modified
libgearman-server/plugins/protocol/http/protocol.cc (+14/-4)
libgearman-server/plugins/queue/libmemcached/queue.cc (+8/-1)
Text conflict in libgearman-server/plugins/protocol/http/protocol.cc
Text conflict in libgearman-server/plugins/queue/libmemcached/queue.cc
To merge this branch: bzr merge lp:~1-infe-w/gearmand/1.0
Reviewer Review Type Date Requested Status
Tangent Trunk 2014-12-17 Pending
Review via email: mp+244981@code.launchpad.net

Description of the change

Bug #1348865 "gearman with http, bad request line, gearmand die"
is closed in gearman-2 but it is steel an issue in gearman-1.0.

bug fixing is commited in revno: 802

To post a comment you must log in.
lp:~1-infe-w/gearmand/1.0 updated on 2014-12-23
803. By palik on 2014-12-23

bug fixing: http response an empty content on post request

palik (1-infe-w) wrote :

HTTP request get a response without content. Content-Lenght: 0

bug report https://bugs.launchpad.net/gearmand/+bug/1152707 is an issue in gearman-1 too.

please apply http://bazaar.launchpad.net/~1-infe-w/gearmand/1.0/revision/803 to fix it.

lp:~1-infe-w/gearmand/1.0 updated on 2015-05-29
804. By palik on 2015-01-23

wrong memcached_return_t in error log. bug r1413889

805. By palik on 2015-02-02

libmemcached produces QUEUE_ERROR for background jobs without unique keys

806. By palik on 2015-05-29

unique size assertion in memcache callback_loade avoids restart if unique keys weren't use

Unmerged revisions

806. By palik on 2015-05-29

unique size assertion in memcache callback_loade avoids restart if unique keys weren't use

805. By palik on 2015-02-02

libmemcached produces QUEUE_ERROR for background jobs without unique keys

804. By palik on 2015-01-23

wrong memcached_return_t in error log. bug r1413889

803. By palik on 2014-12-23

bug fixing: http response an empty content on post request

802. By palik on 2014-12-17

bugfix endless loop on http bad request or bad method

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libgearman-server/plugins/protocol/http/protocol.cc'
2--- libgearman-server/plugins/protocol/http/protocol.cc 2013-07-07 00:16:26 +0000
3+++ libgearman-server/plugins/protocol/http/protocol.cc 2015-05-29 09:44:03 +0000
4@@ -157,6 +157,9 @@
5 case GEARMAN_COMMAND_WORK_FAIL:
6 case GEARMAN_COMMAND_ECHO_RES:
7 case GEARMAN_COMMAND_WORK_COMPLETE:
8+ {
9+ ret_ptr= GEARMAN_SUCCESS;
10+ }
11 break;
12
13 case GEARMAN_COMMAND_JOB_CREATED:
14@@ -215,14 +218,13 @@
15 "HTTP/1.0 200 OK\r\n"
16 "X-Gearman-Job-Handle: %.*s\r\n"
17 "X-Gearman-Command: %s\r\n"
18- "Content-Length: %d\r\n"
19+ "Content-Length: %" PRIu64 "\r\n"
20 "Server: Gearman/" PACKAGE_VERSION "\r\n"
21- "\r\n%.*s",
22+ "\r\n",
23 packet->command == GEARMAN_COMMAND_JOB_CREATED ? int(packet->arg_size[0]) : int(packet->arg_size[0] - 1),
24 (const char *)packet->arg[0], // Job handle
25 gearman_strcommand(packet->command),
26- int(content.size()), // Content-length
27- int(content.size()), &content[0]);
28+ (uint64_t)packet->data_size); // Content-length
29 }
30 else
31 {
32@@ -294,7 +296,11 @@
33 {
34 gearmand_log_error(GEARMAN_DEFAULT_LOG_PARAM, "bad request line: %.*s", (uint32_t)request_size, request);
35 set_response(gearmand::protocol::httpd::HTTP_NOT_FOUND);
36+<<<<<<< TREE
37 ret_ptr= GEARMAND_SUCCESS;
38+=======
39+ ret_ptr= GEARMAN_INVALID_PACKET;
40+>>>>>>> MERGE-SOURCE
41 return 0;
42 }
43
44@@ -330,7 +336,11 @@
45 {
46 gearmand_log_error(GEARMAN_DEFAULT_LOG_PARAM, "bad method: %.*s", (uint32_t)method_size, method_str);
47 set_response(gearmand::protocol::httpd::HTTP_METHOD_NOT_ALLOWED);
48+<<<<<<< TREE
49 ret_ptr= GEARMAND_SUCCESS;
50+=======
51+ ret_ptr= GEARMAN_INVALID_PACKET;
52+>>>>>>> MERGE-SOURCE
53 return 0;
54 }
55 }
56
57=== modified file 'libgearman-server/plugins/queue/libmemcached/queue.cc'
58--- libgearman-server/plugins/queue/libmemcached/queue.cc 2013-05-12 01:03:50 +0000
59+++ libgearman-server/plugins/queue/libmemcached/queue.cc 2015-05-29 09:44:03 +0000
60@@ -243,7 +243,14 @@
61 memcached_return rc= memcached_delete(memc_, (const char *)key, key_length, 0);
62 if (rc != MEMCACHED_SUCCESS)
63 {
64+<<<<<<< TREE
65 return gearmand_gerror(memcached_last_error_message(memc_), GEARMAND_QUEUE_ERROR);
66+=======
67+ if(rc != MEMCACHED_NOTFOUND)
68+ {
69+ return gearmand_gerror(memcached_strerror(memc_, rc), GEARMAN_QUEUE_ERROR);
70+ }
71+>>>>>>> MERGE-SOURCE
72 }
73
74 return GEARMAND_SUCCESS;
75@@ -313,7 +320,7 @@
76 size_t unique_size= strlen(unique);
77
78 assert(unique);
79- assert(unique_size);
80+ //assert(unique_size);
81 assert(function);
82 assert(function_len);
83

Subscribers

People subscribed via source and target branches

to all changes: