| 1890 | } |
| 1891 | |
| 1892 | void Expect(::google::protobuf::RpcController* cntl_base, |
| 1893 | const ::test::HttpRequest*, |
| 1894 | ::test::HttpResponse*, |
| 1895 | ::google::protobuf::Closure* done) override { |
| 1896 | brpc::ClosureGuard done_guard(done); |
| 1897 | brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base); |
| 1898 | const std::string* expect = cntl->http_request().GetHeader("Expect"); |
| 1899 | ASSERT_TRUE(expect != NULL); |
| 1900 | ASSERT_EQ("100-continue", *expect); |
| 1901 | ASSERT_EQ(cntl->http_request().method(), brpc::HTTP_METHOD_POST); |
| 1902 | cntl->response_attachment().append("world"); |
| 1903 | } |
| 1904 | }; |
| 1905 | |
| 1906 | TEST_F(HttpTest, http_head) { |