Skip to content

Commit

Permalink
LOG
Browse files Browse the repository at this point in the history
  • Loading branch information
linyacool committed Mar 4, 2018
1 parent 627e00e commit e80f5ae
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 2 deletions.
Empty file modified WebBench/man/man1/webbench.1
100644 → 100755
Empty file.
Empty file modified WebBench/share/doc/webbench/changelog
100644 → 100755
Empty file.
Empty file modified WebBench/share/doc/webbench/copyright
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions WebServer/HttpData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ void HttpData::handleRead()
{
bool zero = false;
int read_num = readn(fd_, inBuffer_, zero);
LOG << "Request: " << inBuffer_;
if (connectionState_ == H_DISCONNECTING)
{
inBuffer_.clear();
Expand Down Expand Up @@ -606,9 +607,9 @@ void HttpData::handleError(int fd, int err_num, string short_msg)

header_buff += "HTTP/1.1 " + to_string(err_num) + short_msg + "\r\n";
header_buff += "Content-type: text/html\r\n";
header_buff += "Connection: close\r\n";
header_buff += "Connection: Close\r\n";
header_buff += "Content-length: " + to_string(body_buff.size()) + "\r\n";
header_buff += "Host: www.linya.pub\r\n";
header_buff += "Server: LinYa's Web Server\r\n";;
header_buff += "\r\n";
// 错误处理不考虑writen不完的情况
sprintf(send_buff, "%s", header_buff.c_str());
Expand Down
Empty file modified datum/cloc.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified 版本历史.md
100644 → 100755
Empty file.
Empty file modified 遇到的困难.md
100644 → 100755
Empty file.

0 comments on commit e80f5ae

Please sign in to comment.