Skip to content

Commit

Permalink
fix bug:
Browse files Browse the repository at this point in the history
  • Loading branch information
imarvinle committed Mar 2, 2019
1 parent 5d0fb91 commit 0151114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions version_0.3/src/http/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ void HttpServer::send(std::shared_ptr<HttpData> httpData, FileState fileState) {
// 如果是 '/'开头就发送默认页
if (httpData->response_->filePath() == std::string("/")) {
// 现在使用测试页面
sprintf(header, "%sContent-length: %d\r\n\r\n", header, strlen(TEST));
sprintf(header, "%s%s", header, TEST);
sprintf(header, "%sContent-length: %d\r\n\r\n", header, strlen(INDEX_PAGE));
sprintf(header, "%s%s", header, INDEX_PAGE);
} else {
sprintf(header, "%sContent-length: %d\r\n\r\n", header, strlen(NOT_FOUND_PAGE));
sprintf(header, "%s%s", header, NOT_FOUND_PAGE);
Expand Down

0 comments on commit 0151114

Please sign in to comment.