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
=== modified file 'libgearman-server/plugins/protocol/http/protocol.cc'
--- libgearman-server/plugins/protocol/http/protocol.cc 2013-07-07 00:16:26 +0000
+++ libgearman-server/plugins/protocol/http/protocol.cc 2015-05-29 09:44:03 +0000
@@ -157,6 +157,9 @@
157 case GEARMAN_COMMAND_WORK_FAIL:157 case GEARMAN_COMMAND_WORK_FAIL:
158 case GEARMAN_COMMAND_ECHO_RES:158 case GEARMAN_COMMAND_ECHO_RES:
159 case GEARMAN_COMMAND_WORK_COMPLETE:159 case GEARMAN_COMMAND_WORK_COMPLETE:
160 {
161 ret_ptr= GEARMAN_SUCCESS;
162 }
160 break;163 break;
161164
162 case GEARMAN_COMMAND_JOB_CREATED:165 case GEARMAN_COMMAND_JOB_CREATED:
@@ -215,14 +218,13 @@
215 "HTTP/1.0 200 OK\r\n"218 "HTTP/1.0 200 OK\r\n"
216 "X-Gearman-Job-Handle: %.*s\r\n"219 "X-Gearman-Job-Handle: %.*s\r\n"
217 "X-Gearman-Command: %s\r\n"220 "X-Gearman-Command: %s\r\n"
218 "Content-Length: %d\r\n"221 "Content-Length: %" PRIu64 "\r\n"
219 "Server: Gearman/" PACKAGE_VERSION "\r\n"222 "Server: Gearman/" PACKAGE_VERSION "\r\n"
220 "\r\n%.*s",223 "\r\n",
221 packet->command == GEARMAN_COMMAND_JOB_CREATED ? int(packet->arg_size[0]) : int(packet->arg_size[0] - 1),224 packet->command == GEARMAN_COMMAND_JOB_CREATED ? int(packet->arg_size[0]) : int(packet->arg_size[0] - 1),
222 (const char *)packet->arg[0], // Job handle225 (const char *)packet->arg[0], // Job handle
223 gearman_strcommand(packet->command),226 gearman_strcommand(packet->command),
224 int(content.size()), // Content-length227 (uint64_t)packet->data_size); // Content-length
225 int(content.size()), &content[0]);
226 }228 }
227 else229 else
228 {230 {
@@ -294,7 +296,11 @@
294 {296 {
295 gearmand_log_error(GEARMAN_DEFAULT_LOG_PARAM, "bad request line: %.*s", (uint32_t)request_size, request);297 gearmand_log_error(GEARMAN_DEFAULT_LOG_PARAM, "bad request line: %.*s", (uint32_t)request_size, request);
296 set_response(gearmand::protocol::httpd::HTTP_NOT_FOUND);298 set_response(gearmand::protocol::httpd::HTTP_NOT_FOUND);
299<<<<<<< TREE
297 ret_ptr= GEARMAND_SUCCESS;300 ret_ptr= GEARMAND_SUCCESS;
301=======
302 ret_ptr= GEARMAN_INVALID_PACKET;
303>>>>>>> MERGE-SOURCE
298 return 0;304 return 0;
299 }305 }
300306
@@ -330,7 +336,11 @@
330 {336 {
331 gearmand_log_error(GEARMAN_DEFAULT_LOG_PARAM, "bad method: %.*s", (uint32_t)method_size, method_str);337 gearmand_log_error(GEARMAN_DEFAULT_LOG_PARAM, "bad method: %.*s", (uint32_t)method_size, method_str);
332 set_response(gearmand::protocol::httpd::HTTP_METHOD_NOT_ALLOWED);338 set_response(gearmand::protocol::httpd::HTTP_METHOD_NOT_ALLOWED);
339<<<<<<< TREE
333 ret_ptr= GEARMAND_SUCCESS;340 ret_ptr= GEARMAND_SUCCESS;
341=======
342 ret_ptr= GEARMAN_INVALID_PACKET;
343>>>>>>> MERGE-SOURCE
334 return 0;344 return 0;
335 }345 }
336 }346 }
337347
=== modified file 'libgearman-server/plugins/queue/libmemcached/queue.cc'
--- libgearman-server/plugins/queue/libmemcached/queue.cc 2013-05-12 01:03:50 +0000
+++ libgearman-server/plugins/queue/libmemcached/queue.cc 2015-05-29 09:44:03 +0000
@@ -243,7 +243,14 @@
243 memcached_return rc= memcached_delete(memc_, (const char *)key, key_length, 0);243 memcached_return rc= memcached_delete(memc_, (const char *)key, key_length, 0);
244 if (rc != MEMCACHED_SUCCESS)244 if (rc != MEMCACHED_SUCCESS)
245 {245 {
246<<<<<<< TREE
246 return gearmand_gerror(memcached_last_error_message(memc_), GEARMAND_QUEUE_ERROR);247 return gearmand_gerror(memcached_last_error_message(memc_), GEARMAND_QUEUE_ERROR);
248=======
249 if(rc != MEMCACHED_NOTFOUND)
250 {
251 return gearmand_gerror(memcached_strerror(memc_, rc), GEARMAN_QUEUE_ERROR);
252 }
253>>>>>>> MERGE-SOURCE
247 }254 }
248255
249 return GEARMAND_SUCCESS;256 return GEARMAND_SUCCESS;
@@ -313,7 +320,7 @@
313 size_t unique_size= strlen(unique);320 size_t unique_size= strlen(unique);
314321
315 assert(unique);322 assert(unique);
316 assert(unique_size);323 //assert(unique_size);
317 assert(function);324 assert(function);
318 assert(function_len);325 assert(function_len);
319326

Subscribers

People subscribed via source and target branches

to all changes: