mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-09 04:17:30 +08:00
[http] Avoid recursive call of bufferevent write callback when https is in use.
This commit is contained in:
parent
788ada4b31
commit
db015503e6
@ -450,6 +450,10 @@ do_file(evhtp_request_t *req, SeafRepo *repo, const char *file_id,
|
|||||||
*/
|
*/
|
||||||
evhtp_request_pause (req);
|
evhtp_request_pause (req);
|
||||||
|
|
||||||
|
/* Avoid recursive call of write_data_cb(). */
|
||||||
|
if (req->htp->ssl_cfg != NULL)
|
||||||
|
evbuffer_defer_callbacks (bev->output, bev->ev_base);
|
||||||
|
|
||||||
/* Kick start data transfer by sending out http headers. */
|
/* Kick start data transfer by sending out http headers. */
|
||||||
evhtp_send_reply_start(req, EVHTP_RES_OK);
|
evhtp_send_reply_start(req, EVHTP_RES_OK);
|
||||||
|
|
||||||
@ -563,6 +567,10 @@ do_dir (evhtp_request_t *req, SeafRepo *repo, const char *dir_id,
|
|||||||
*/
|
*/
|
||||||
evhtp_request_pause (req);
|
evhtp_request_pause (req);
|
||||||
|
|
||||||
|
/* Avoid recursive call of write_dir_data_cb(). */
|
||||||
|
if (req->htp->ssl_cfg != NULL)
|
||||||
|
evbuffer_defer_callbacks (bev->output, bev->ev_base);
|
||||||
|
|
||||||
/* Kick start data transfer by sending out http headers. */
|
/* Kick start data transfer by sending out http headers. */
|
||||||
evhtp_send_reply_start(req, EVHTP_RES_OK);
|
evhtp_send_reply_start(req, EVHTP_RES_OK);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user