Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support zero length uploads #196

Closed
bluetianx opened this issue Apr 15, 2024 · 5 comments
Closed

Support zero length uploads #196

bluetianx opened this issue Apr 15, 2024 · 5 comments

Comments

@bluetianx
Copy link

if UploadLength is set to zero without setting IsUploadDeferLength to true, is this case reasonable in Creation of Protocol Extensions? I do not find detail about that

@Acconut
Copy link
Member

Acconut commented Apr 15, 2024

Yes, Upload-Length can be 0. The spec only requires the header to be non-negative, so 0 is explicitly included.

The Upload-Length request and response header indicates the size of the entire upload in bytes. The value MUST be a non-negative integer.

@bluetianx
Copy link
Author

bluetianx commented Apr 15, 2024

The spec only requires the header to be non-negative

I can not find it in Creation of Protocol Extensions, but I can see it in Patch Protocol. Shall we fill it in Creation of Protocol Extensions?

@Acconut
Copy link
Member

Acconut commented Apr 17, 2024

I can not find it in Creation of Protocol Extensions, but I can see it in Patch Protocol. Shall we fill it in Creation of Protocol Extensions?

We can add a statement to explain that zero-length uploads are explicitly allowed, yes.

Acconut added a commit that referenced this issue Apr 23, 2024
Empty uploads with `Upload-Length: 0` were previously already allowed but this PR explicitly mentions them and provides more context on how to handle them.

This change is based on a question from #196.
@Acconut
Copy link
Member

Acconut commented Apr 23, 2024

@bluetianx Would the changes in #197 have helped you understand this?

Acconut added a commit that referenced this issue Apr 23, 2024
Empty uploads with `Upload-Length: 0` were previously already allowed but this PR explicitly mentions them and provides more context on how to handle them.

This change is based on a question from #196.
@bluetianx
Copy link
Author

For sure, Thank you @Acconut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants