Skip to content

Commit

Permalink
Simplify HttpHeaderCreator::init_status_line.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 6c2962fcf126025a2b3066ade41baa9a2ba327d3
  • Loading branch information
levlam committed Jun 9, 2020
1 parent e8dba31 commit 708ff55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tdnet/td/net/HttpHeaderCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ class HttpHeaderCreator {
sb_ << "HTTP/1.1 " << code << " " << reason << "\r\n";
}
void init_status_line(int http_status_code) {
sb_ = StringBuilder(MutableSlice{header_, MAX_HEADER});
sb_ << "HTTP/1.1 " << http_status_code << " " << get_status_line(http_status_code) << "\r\n";
init_error(http_status_code, get_status_line(http_status_code));
}
void add_header(Slice key, Slice value) {
sb_ << key << ": " << value << "\r\n";
Expand Down

0 comments on commit 708ff55

Please sign in to comment.