cloudflare / cloudflare/workerd
Support MKCALENDAR requests at Worker ingress
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
## Support `MKCALENDAR` requests at Worker ingress
### Reproduction
Deploy a module Worker that returns the incoming request method:
```ts
export default {
fetch(request: Request): Response {
return new Response(request.method, {
headers: { "X-Observed-Method": request.method },
});
},
};
```
Then send:
```bash
curl -i -X PROPFIND https://.workers.dev/
curl -i -X MKCOL https://.workers.dev/
curl -i -X MKCALENDAR https://.workers.dev/
```
With Wrangler 4.110.0 and compatibility date 2026-07-12, `PROPFIND` and `MKCOL` reach the Worker and return its response. `MKCALENDAR` does not reach the Worker and instead returns:
```text
HTTP/2 501
content-length: 0
server: cloudflare
```
`wrangler dev` reproduces the rejection locally as:
```text
HTTP/1.1 501 Not Implemented
ERROR: Unrecognized request method.
```
Constructing the same request through the Workers Vitest runtime rejects before invocation with:
```text
TypeError: Invalid HTTP method string: MKCALENDAR
```
### Expected behavior
`MKCALENDAR` should reach Worker code like the other supported WebDAV methods.
### Use case
`MKCALENDAR` is defined by CalDAV (RFC 4791) and is required for standards-based creation of calendar collections. Returning 501 before Worker invocation prevents a Worker from implementing complete CalDAV calendar creation.
### Source observation
Current workerd source includes common WebDAV methods such as `MKCOL`, `PROPFIND`, `PROPPATCH`, `ACL`, and `REPORT` in the `kj::HttpMethod` bridge but omits `MKCALENDAR`:
- https://github.com/cloudflare/workerd/blob/a51ee4b96980cec92d3628f39f74a86e451d8ad1/src/rust/kj/http.rs
- https://github.com/cloudflare/workerd/blob/a51ee4b96980cec92d3628f39f74a86e451d8ad1/src/workerd/api/http.c%2B%2B
Wrangler's bundled HTTP parser and Node HTTP method constants already recognize `MKCALENDAR`, so the rejection appears to occur at the workerd HTTP-method boundary.
Contributor guide
Research direction
Start by tracing the HTTP-method boundary in src/rust/kj/http.rs and src/workerd/api/http.c++, comparing the existing MKCOL, PROPFIND, PROPPATCH, ACL, and REPORT handling. Reproduce the failure with wrangler dev or the Workers Vitest runtime; done means MKCALENDAR reaches the Worker and returns its method instead of producing a 501 or validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust, typescript
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100