Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuiba committed May 20, 2024
1 parent 4052213 commit 492049b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion net/http/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Message : public IStream {
ssize_t write(const void *buf, size_t count) override;
ssize_t writev(const struct iovec *iov, int iovcnt) override;
ssize_t write_stream(IStream *stream, size_t size_limit = -1);
int close() override { return 0; }

// size of body
size_t body_size() const;
Expand Down Expand Up @@ -130,7 +131,6 @@ class Message : public IStream {
int append_bytes(uint16_t size);

int skip_remain();
int close() override { return 0; }

std::string_view partial_body() const {
return std::string_view{m_buf, m_buf_size} | m_body;
Expand Down
7 changes: 1 addition & 6 deletions net/http/test/client_function_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ limitations under the License.
#include <photon/net/curl.h>
#include <photon/net/socket.h>
#include <photon/common/alog.h>
#define protected public
#define private public
#include "../client.cpp"
#undef protected
#undef private
#include "../server.h"
// #include "client.h"
#include <photon/io/fd-events.h>
#include <photon/thread/thread11.h>
#include <photon/common/stream.h>
Expand Down Expand Up @@ -607,7 +602,7 @@ TEST(http_client, user_agent) {
client->set_user_agent("TEST_UA");
DEFER(delete client);
auto op = client->new_operation(Verb::GET, target_get);
DEFER(delete op);
DEFER(op->destroy());
op->req.headers.content_length(0);
client->call(op);
EXPECT_EQ(op->status_code, 200);
Expand Down

0 comments on commit 492049b

Please sign in to comment.