Add a test for an error while reading the request body for an outgoing
request.

Apparently, Serf 1.3.x has a few related problems, which were fixed in
trunk by the introduced pump layer.  This test should aid in preparing
the 1.3.x-specific fix for these issues.

* test/test_serf.h
  (test_request_setup_t): New typedef.
  (handler_baton_t): Add an optional test_request_setup_t.
  (create_new_request_with_resp_hdlr): Morph into ...
  (create_new_request_ex): ...this new function that allows setting up
   non-default request setup and response handlers.
  (setup_handler): Accept an optional test_request_setup_t.

* test/test_util.c
  (create_new_request_with_resp_hdlr): Morph into ...
  (create_new_request_ex): ...this new function that allows setting up
   non-default request setup and response handlers.
  (setup_handler): Accept an optional test_request_setup_t.
  (create_new_prio_request, create_new_request): Update calls to
   setup_handler().
  (setup_request): Use the custom test_request_setup_t if available.

* test/test_context.c
  (test_keepalive_limit_one_by_one,
   test_keepalive_limit_one_by_one_and_burst): Adjust to cope with the
   rename of create_new_request_with_resp_hdlr().
  (setup_request_err): New helper function, implements test_request_setup_t.
  (test_outgoing_request_err): New test.
  (test_context): Add new test.


git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1804534 13f79535-47bb-0310-9956-ffa450edef68
3 files changed