Skip to content

Commit

Permalink
lssl添加
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed Apr 11, 2024
1 parent 9f30dc3 commit a926656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extend/lcodec/src/http.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ namespace lcodec {

protected:
virtual void format_http(lua_State* L, int* index) = 0;
virtual void parse_http_packet(lua_State* L, string_view buf) = 0;
virtual void parse_http_packet(lua_State* L, string_view& buf) = 0;

void http_parse_body(lua_State* L, string_view header, string_view buf) {
void http_parse_body(lua_State* L, string_view header, string_view& buf) {
m_buf->clean();
bool jsonable = false;
bool contentlenable = false;
Expand Down Expand Up @@ -210,7 +210,7 @@ namespace lcodec {
}
}

virtual void parse_http_packet(lua_State* L, string_view buf) {
virtual void parse_http_packet(lua_State* L, string_view& buf) {
size_t pos = buf.find(CRLF2);
if (pos == string_view::npos) {
throw length_error("http text not full");
Expand Down Expand Up @@ -272,7 +272,7 @@ namespace lcodec {
m_buf->push_data((const uint8_t*)buf, len);
}

virtual void parse_http_packet(lua_State* L, string_view buf) {
virtual void parse_http_packet(lua_State* L, string_view& buf) {
size_t pos = buf.find(CRLF2);
if (pos == string_view::npos) {
throw length_error("http text not full");
Expand Down

0 comments on commit a926656

Please sign in to comment.