cloudflare / serverless-registry

A container registry backed by Workers and R2.
Apache License 2.0
997 stars 36 forks source link

16k url length limit fix #30

Closed IvanDev closed 7 months ago

IvanDev commented 7 months ago

This PR fixes the issue of the evergrowing state url parameter for chunked uploads, on very large layers state jwt could exceed 16k limit for worker URL resulting in failed uploads. This fix replaces state with stateHash to make sure the upload state is consistently in order across chunk sequence (relying on the docker spec requirement of chunk uploads being sequential)

gabivlj commented 7 months ago

Thanks this is very good! Really wanted to get this state thing done as we started off with a simple jwt but then we just moved to keeping state in r2. If you can run the linter over this I'd appreciate it.

IvanDev commented 7 months ago

Sure!