Commit 6dd0af66 authored by zhujiashun's avatar zhujiashun

Remove unnecessary condition judgement

parent eeb07057
......@@ -771,8 +771,6 @@ HttpResponseSender::~HttpResponseSender() {
ParseContentType(req_header->content_type()) == HTTP_CONTENT_GRPC;
if (cntl->Failed()) {
// TODO(zhujiashun): really need this?
if (!grpc_protocol) {
// Set status-code with default value(converted from error code)
// if user did not set it.
if (res_header->status_code() == HTTP_STATUS_OK) {
......@@ -789,7 +787,6 @@ HttpResponseSender::~HttpResponseSender() {
res_header->set_content_type(common->CONTENT_TYPE_TEXT);
cntl->response_attachment().clear();
cntl->response_attachment().append(cntl->ErrorText());
}
} else if (cntl->has_progressive_writer()) {
// Transfer-Encoding is supported since HTTP/1.1
if (res_header->major_version() < 2 && !res_header->before_http_1_1()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment