Log Message: |
In mod_dav_svn, switch every remaining usage of ap_fputs(), ap_fprintf()
and ap_fputstrs() to dav_svn__brigade functions.
Doing so ensures proper error handling in case of dead sockets (this
is issue 1709, see https://issues.apache.org/jira/browse/SVN-1709).
And with this change, every output that happens in mod_dav_svn now either
uses the dav_svn__brigade functions or manually prepares a bucket and
shoves it to the output filter stack by calling ap_pass_brigade().
This is an important prerequisite to fix the unbounded memory usage in
a case when mod_dav_svn is paired up with mod_headers or mod_deflate.
* subversion/mod_dav_svn/dav_svn.h
(dav_svn__brigade_putstrs): New wrapper for apr_brigade_vputstrs().
* subversion/mod_dav_svn/util.c
(dav_svn__brigade_putstrs): Implement new wrapper.
* subversion/mod_dav_svn/repos.c
(emit_collection_head, emit_collection_entry, emit_collection_tail):
Use dav_svn__brigade functions. Return possible errors, and ...
(deliver): ...handle them here.
* subversion/mod_dav_svn/merge.c
(send_response, dav_svn__merge_response): Use dav_svn__brigade functions.
* subversion/mod_dav_svn/reports/dated-rev.c
(dav_svn__dated_rev_report): Use dav_svn__brigade functions.
* subversion/mod_dav_svn/reports/deleted-rev.c
(dav_svn__get_deleted_rev_report): Use dav_svn__brigade functions.
* subversion/mod_dav_svn/reports/get-location-segments.c
(location_segment_receiver): Use dav_svn__brigade functions.
* subversion/mod_dav_svn/reports/get-locations.c
(send_get_locations_report): Use dav_svn__brigade functions. Return
an svn_error_t instead of an apr_status_t, and handle it ...
(dav_svn__get_locations_report): ...here.
* subversion/mod_dav_svn/reports/get-locks.c
(SVN_APR_ERR): Remove this macro.
(send_get_lock_response): Use dav_svn__brigade functions. Return
an svn_error_t of an apr_status_t, and handle it ...
(dav_svn__get_locks_report): ...here.
|