Skip to content

feat: add webdav http methods#3836

Merged
mcollina merged 11 commits intofastify:mainfrom
hungtcs:webdav-methods
Jul 25, 2022
Merged

feat: add webdav http methods#3836
mcollina merged 11 commits intofastify:mainfrom
hungtcs:webdav-methods

Conversation

@hungtcs
Copy link
Contributor

@hungtcs hungtcs commented Apr 14, 2022

Relat #9

Checklist

@mcollina
Copy link
Member

Do those method accept a body? Can you please test like the other methods are tested?

Those methods are not that common, I would not add the shorthands.

@hungtcs
Copy link
Contributor Author

hungtcs commented Apr 15, 2022

@mcollina Yes, some method receive a body of type xml sometimes, I will adjust some details later.

@hungtcs
Copy link
Contributor Author

hungtcs commented Apr 16, 2022

Looks like it's almost done, but before merging, I will write a simple WebDAV server for real world test.

@stale
Copy link

stale bot commented May 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue or pr with more than 15 days of inactivity. label May 1, 2022
Copy link

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm +1 ✅

@@ -0,0 +1,22 @@
'use strict'

Copy link

@3imed-jaberi 3imed-jaberi May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's would be better to split the supported methods into 2 arrays. it helps when we like to provide an option for enabling/disabling the WebDAV methods...

const baseHtttpMethods = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT', 'OPTIONS']
const webDAVHtttpMethods = ['PROPFIND', 'PROPPATCH', 'MKCOL', 'COPY', 'MOVE', 'LOCK', 'UNLOCK', 'TRACE', 'SEARCH']

module.exports = {
  supportedMethods: [...baseHtttpMethods, ...webDAVHtttpMethods] // you can use concat or whatever!
}

@stale stale bot removed stale Issue or pr with more than 15 days of inactivity. labels May 7, 2022
@hungtcs hungtcs marked this pull request as ready for review June 16, 2022 07:09
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants