Function
getLockTokensFromIfHeader
(ifHeader: string | null)
Source from the content-addressed store, hash-verified
| 8 | |
| 9 | // Pulls lock tokens out of an `If` header (RFC 4918 §10.4), ignoring its etag/resource-tag parts. |
| 10 | export function getLockTokensFromIfHeader(ifHeader: string | null): string[] { |
| 11 | if (!ifHeader) { |
| 12 | return []; |
| 13 | } |
| 14 | |
| 15 | return [...ifHeader.matchAll(/<([^>]+)>/g)].map((match) => match[1]); |
| 16 | } |
| 17 | |
| 18 | const webDavStatusTexts: Record<number, string> = { |
| 19 | 403: 'Forbidden', |
Tested by
no test coverage detected