This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
lykan commit #15
Open
likeran2234
wants to merge
1
commit into
AIOps-ISET:master
Choose a base branch
from
likeran2234:dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
lykan commit #15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey @likeran2234, thanks for the PR! The review will start once |
shejialuo
reviewed
Nov 21, 2022
Comment on lines
+2
to
+13
#include<string> | ||
using namespace std; | ||
void HttpProcess(string& req, string* resp) | ||
{ | ||
string first_line = "HTTP/1.0 200 OK\n"; | ||
string body = "<html><div><h1>hello world</h1></div></html\n"; | ||
string header = "Content-Type: text/html\ncharset: gbk\nContent-Length:" | ||
+to_string(body.size())+"\n\n"; | ||
*resp = first_line + header + body; | ||
//service firewalld stop 关闭防火墙 #centos 7 | ||
//service firewalld status | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一段代码是为了测试代码的功能能否实现吗?建议在后续的commit中放到测试文件中
shejialuo
reviewed
Nov 21, 2022
Comment on lines
+140
to
+145
struct Arg{ | ||
TcpSocket new_sock; | ||
string ip; | ||
uint16_t port; | ||
Handler handler; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct Arg
是不是应该暴露给用户的定义,如果不是,建议放在TcpPthreadServer
中作为私有变量。
shejialuo
suggested changes
Nov 21, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
细节修改
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
创造了dev分支,对http_sever的代码进行更新