hesprs_obsidian-webdav-sync/test
tarmbruster c7b5182435
fix(webdav-patch): use content-type header instead of accept for requestUrl (#176)
* fix(webdav-patch): use content-type header instead of accept for requestUrl

PROPFIND requests send a comma-separated Accept header
(text/plain,application/xml), which was previously used as the
Content-Type when forwarding to Obsidian's requestUrl. Some WebDAV
servers (e.g. GMX) reject that with 400 Bad Request since it's not a
valid Content-Type value. Prefer the actual content-type header and
only fall back to accept when it's absent.

* fix(webdav-patch): never fall back to accept for requestUrl contentType

client.exists()/stat() PROPFIND requests only set an Accept header
(a comma list) and send no body, so the previous fallback still
leaked the comma list into Content-Type and GMX kept rejecting it
with 400. Only use an explicit content-type header; leave contentType
unset otherwise.

* cleanup(api): cleanup dead code in API patch

`retractedHeaders` seems to be unused. Old technical debt, remove anyway.

---------

Co-authored-by: Hēsperus <hesprs@outlook.com>
2026-07-20 18:20:15 +08:00
..
mocks refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
encryption-utils.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
glob-match.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
merge-utils.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
mobile-compat.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
optimize-tasks.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
platform-path.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
split-chunks.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
traverse-webdav.test.ts feat(settings): Add custom headers option (#158) 2026-06-22 12:23:46 +08:00
unit-converter.test.ts refactor(all): shift to bun (#153) 2026-06-07 17:36:49 +08:00
v3-migration-modules.test.ts feat(migration): v3 migration (#167) 2026-07-10 23:56:10 +08:00
v3-migration-service.test.ts feat(migration): v3 migration (#167) 2026-07-10 23:56:10 +08:00
v3-migration-settings.test.ts feat(migration): v3 migration (#167) 2026-07-10 23:56:10 +08:00
v3-migration-storage.test.ts feat(migration): v3 migration (#167) 2026-07-10 23:56:10 +08:00
webdav-patch.test.ts fix(webdav-patch): use content-type header instead of accept for requestUrl (#176) 2026-07-20 18:20:15 +08:00
webdav.test.ts fix(test): isolate tests (#154) 2026-06-07 18:07:30 +08:00