feat: adds webdav methods that require body & content type parsing#5411
feat: adds webdav methods that require body & content type parsing#5411mcollina merged 7 commits intofastify:mainfrom johaven:feat-webdav-methods-body
Conversation
metcoder95
left a comment
There was a problem hiding this comment.
Can you add some tests for them?
|
These methods are already tested in the PR I mentioned |
|
Seems |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Oh this PR is fine, my mistake I meant to talk about this issue where you suggested backporting #4409, that would be breaking |
|
The modified tests simply changed the execution at: https://github.com/fastify/fastify/pull/5411/files#diff-15a9e086692377c86b02752c54c928f4ca6f697758fc5dacc09bbde1d2dff96bR32-R45 Not sure if coverage is enabled but now the case where content-type is undefined may not be getting tested, so I think it would be better to add these as separate tests; just add one more request to each test with the header |
docs/Reference/Routes.md
Outdated
|
|
||
| * `body`: validates the body of the request if it is a POST, PUT, PATCH, | ||
| TRACE, or SEARCH method. | ||
| TRACE, SEARCH, PROPFIND, PROPPATCH, LOCK or UNLOCK method. |
There was a problem hiding this comment.
And also not familiar with webdav but just pointing out that UNLOCK method wasn't added anywhere if that was unintentional
There was a problem hiding this comment.
After a check in the webdav RFC, UNLOCK method does not require a body, a mistake fixed in 54bf25c
I forgot to update the doc, sorry !
Done in 97ff092 |
|
Just a note: tests were modified, which means behavior has changed, but these methods work with a body, and it really seems like an oversight from the original PR that added them, so I take it as a bugfix |
It depends on the methods concerned but the RFC is rather flexible as you can see here (https://datatracker.ietf.org/doc/html/rfc4918#section-9.1) : Overall I agree with you, I think that indeed the tests were not complete but part of the implementation was missing. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
npm run testandnpm run benchmarkand the Code of conduct
Adds webdav methods that require parsing, missing from this PR: #3836