Index: subversion/mod_dav_svn/file_revs.c =================================================================== --- subversion/mod_dav_svn/file_revs.c (revision 13202) +++ subversion/mod_dav_svn/file_revs.c (working copy) @@ -273,14 +273,9 @@ if (serr) { - /* We don't 'goto cleanup' because ap_fflush() tells httpd - to write the HTTP headers out, and that includes whatever - r->status is at that particular time. When we call - dav_svn_convert_err(), we don't immediately set r->status - right then, so r->status remains 0, hence HTTP status 200 - would be misleadingly returned. */ - return (dav_svn_convert_err(serr, HTTP_INTERNAL_SERVER_ERROR, - serr->message, resource->pool)); + derr = dav_svn_convert_err(serr, HTTP_INTERNAL_SERVER_ERROR, + serr->message, resource->pool); + goto cleanup; } if ((serr = maybe_send_header(&frb))) @@ -302,9 +297,10 @@ cleanup: - /* Flush the contents of the brigade (returning an error only if we - don't already have one). */ - if (((apr_err = ap_fflush(output, frb.bb))) && (! derr)) + /* Flush the contents of the brigade if we don't have an error yet. + ap_fflush() tells httpd to write the HTTP headers out, including + whatever r->status is at that particular time. */ + if ((! derr) && ((apr_err = ap_fflush(output, frb.bb)))) derr = dav_svn_convert_err(svn_error_create(apr_err, 0, NULL), HTTP_INTERNAL_SERVER_ERROR, "Error flushing brigade", Index: subversion/mod_dav_svn/log.c =================================================================== --- subversion/mod_dav_svn/log.c (revision 13202) +++ subversion/mod_dav_svn/log.c (working copy) @@ -339,7 +339,7 @@ /* Flush the contents of the brigade (returning an error only if we don't already have one). */ - if (((apr_err = ap_fflush(output, lrb.bb))) && (! derr)) + if ((! derr) && ((apr_err = ap_fflush(output, lrb.bb)))) derr = dav_svn_convert_err(svn_error_create(apr_err, 0, NULL), HTTP_INTERNAL_SERVER_ERROR, "Error flushing brigade.", Index: subversion/mod_dav_svn/version.c =================================================================== --- subversion/mod_dav_svn/version.c (revision 13202) +++ subversion/mod_dav_svn/version.c (working copy) @@ -880,7 +880,7 @@ /* Flush the contents of the brigade (returning an error only if we don't already have one). */ - if (((apr_err = ap_fflush(output, bb))) && (! derr)) + if ((! derr) && ((apr_err = ap_fflush(output, bb)))) derr = dav_svn_convert_err(svn_error_create(apr_err, 0, NULL), HTTP_INTERNAL_SERVER_ERROR, "Error flushing brigade.", @@ -1027,7 +1027,7 @@ /* Flush the contents of the brigade (returning an error only if we don't already have one). */ - if (((apr_err = ap_fflush(output, bb))) && (! derr)) + if ((! derr) && ((apr_err = ap_fflush(output, bb)))) return dav_svn_convert_err(svn_error_create(apr_err, 0, NULL), HTTP_INTERNAL_SERVER_ERROR, "Error flushing brigade.",