-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev/location test pr #10
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b14c097
feat: create a new branch by taking the work I did in dev/test location
miooo0o eaa6862
Merge branch 'pr-9' into dev/location_test_pr
miooo0o 9bfd0df
fix: after testing,
miooo0o 7f448c7
fix: _getMatchedLocation() logc...
miooo0o 02551e8
Update: Renamed/unified some methods (HttpResponse, StaticFileHandler)
miooo0o b0665de
update: code cleanup, modularization, add new private var: bodyLength…
miooo0o 216049d
update: delete unused enum -- HttpResponse
miooo0o 301f682
fix: fixed StaticFileHandler to reflect PR reviews
miooo0o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update: Renamed/unified some methods (HttpResponse, StaticFileHandler)
- Loading branch information
commit 02551e84d3a7ee84f1ee7279d00649521f975cb5
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: minakim <minakim@student.42berlin.de> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/06/30 16:23:00 by sanghupa #+# #+# */ | ||
/* Updated: 2024/07/24 01:14:50 by minakim ### ########.fr */ | ||
/* Updated: 2024/07/25 12:19:31 by minakim ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -62,9 +62,9 @@ HttpResponse StaticFileHandler::handleRequest(const HttpRequest& request, const | |
{ | ||
// if (/* && location.location.isListDir() */) | ||
// return (_handleDirListing(request, location)); | ||
return (_handleDirRequest(request, location)); | ||
return (_handleDirRequest(request, location)); | ||
} | ||
else if (isFile(_handledPath)) | ||
if (isFile(_handledPath)) | ||
return (_handleFileRequest(request, location)); | ||
return (_handleNotFound()); | ||
} | ||
|
@@ -83,7 +83,8 @@ HttpResponse StaticFileHandler::_handleDirRequest(const HttpRequest& request, co | |
_setHandledPath(absolutePath); | ||
|
||
std::cout << "TEST | absolute path that with index is built: " << _handledPath << std::endl; | ||
|
||
if (isFile(_handledPath)) | ||
return (_handleNotFound()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line 91: The condition is wrong.
if (!isFile(_handledPath))
return (_handleNotFound()); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이런 치명적인 실수를. 감사합니다, 수정할게요. |
||
modifiedRequest.setUri(getFullPath()); | ||
return (_handleFileRequest(modifiedRequest, location)); | ||
} | ||
|
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.
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.
이거는 보정이 필요해 보입니다. 탭이 너무 많네요... ㅎ
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.
확인하고 수정할게요!