fix: accept 204 No Content status code in ping method#57
Open
Mahoo12138 wants to merge 2 commits intoflymzero:mainfrom
Open
fix: accept 204 No Content status code in ping method#57Mahoo12138 wants to merge 2 commits intoflymzero:mainfrom
Mahoo12138 wants to merge 2 commits intoflymzero:mainfrom
Conversation
- Update the ping method to consider 204 No Content as a valid response - This change improves compatibility with services that may return 204 instead of 200
e46d6ba to
7b43ba2
Compare
- Add a new method _validateOptionsResponse to handle OPTIONS response validation - Update wdProps, wdMkcol, wdMkdir, and wdTouch methods to use the new validation method - Improve error handling by throwing a more descriptive error when OPTIONS request fails
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix: Accept 204 status code for OPTIONS request in ping method
Description
Currently, the
ping()method only accepts HTTP status code 200 for OPTIONS requests. However, according to HTTP/1.1 specification, status code 204 (No Content) is also a valid response for OPTIONS requests. This change makes the client more compatible with standard-compliant WebDAV servers.Changes
ping()method to accept both 200 and 204 status codesCode Changes
Why
Testing