Skip to content

Commit

Permalink
Merge pull request #142 from ilovenoah/create-pull-request/patch
Browse files Browse the repository at this point in the history
feature/formatting-by-clang-format-on-github-actions
  • Loading branch information
ilovenoah authored Mar 2, 2024
2 parents 5ef1c74 + f2dcb2f commit 37f2972
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/loop/loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ bool loop(std::map<int, ServerSocket> &ssmap, Config &config) {
csiter->second->getPhase() == ClientSocket::CLOSE) {
continue;
}
if (iter->second.getReqphase() != Request::RQBODY && utils::findLF(csiter->second->buffer) == false && csiter->second->isOverBytesSize(1000) == true) {
if (iter->second.getReqphase() != Request::RQBODY &&
utils::findLF(csiter->second->buffer) == false &&
csiter->second->isOverBytesSize(1000) == true) {
iter->second.init();
iter->second.setReqphase(Request::RQFIN);
} else if ((utils::findLF(csiter->second->buffer) ||
iter->second.getReqphase() == Request::RQBODY)) {
iter->second.getReqphase() == Request::RQBODY)) {
ClientSocket::csphase nextcsphase =
iter->second.load(csiter->second->buffer);
csiter->second->setPhase(nextcsphase);
Expand Down
2 changes: 1 addition & 1 deletion src/response/Response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void Response::_setCGIResponseHeader(const bool shouldKeepAlive) {
std::getline(hss, value);
if (this->_headers.size() > RESPONSE_HEADER_LIMITATION - 1) {
this->_headers.clear();
return ;
return;
}
this->_headers.insert(std::pair<std::string, std::string>(key, value));
}
Expand Down

0 comments on commit 37f2972

Please sign in to comment.