Close #109 修正302重定向在Firefox浏览器下跳转缓慢的问题

* Firefox要求302应答体必须包含Content-Length,否则无法正确处理消息体
* 增加302应答的Content-Length字段,填为0.
This commit is contained in:
luqiuwen
2019-01-10 15:48:22 +06:00
parent d986d8a8cc
commit f01fd2adc7
2 changed files with 2 additions and 1 deletions

View File

@@ -1002,6 +1002,7 @@ static void http_redirect(const struct tfe_http_session * session, enum tfe_http
response = tfe_http_session_response_create(to_write, resp_code);
tfe_http_std_field_write(response, TFE_HTTP_LOCATION, url);
tfe_http_std_field_write(response, TFE_HTTP_CONT_LENGTH, "0");
tfe_http_half_append_body(response, NULL, 0, 0);
tfe_http_session_response_set(to_write, response);