sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

Return error `400` for unsupported propfind depths #402

Closed grote closed 1 month ago

grote commented 1 month ago

I understand this is a minimal implementation, not fully implementing all spec, but here's a tiny reasonable request:

Return error 400 for unsupported propfind depths (I guess anything other than 0 and 1) like nginx does. The depth is in the header and should be readily available.

Related to https://github.com/sigoden/dufs/issues/387

grote commented 1 month ago

I don't really know rust, but looks like this is already returned for missing depths here: https://github.com/sigoden/dufs/blob/dc7a7cbb3f0f19441152de036c5bc904dc9186e3/src/server.rs#L964-L973

grote commented 1 month ago

Awesome, thanks a lot for the quick fix!