-
Notifications
You must be signed in to change notification settings - Fork 16
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
Replace Patches:
+Patch-Length:
with Patch-Lengths:
#103
Comments
Hm! Things I like about this:
Things I dislike:
Another approach here would be to lean on the multipart/form-data spec, which is already implemented in browsers, doesn't have the limit of
For us, maybe something like this:
|
I've always been a strong proponent of explicitly-declared lengths as opposed to magical delimiter strings (whether Other than a small gain in spec simplicity, what's the downside to having each patch specify its length? |
A sufficiently random & long delimiter string will act like a uuid, and should work without worrying about escaping or whatever. The nice thing about an approach like this is that there will almost always be just one patch. Writing |
Since this is the "Version" block header field (not the HTTP header field), I don't think there is such a limit? |
Yes, true in subscriptions but not in PUT / PATCH messages - which should probably have the same syntax |
What is nice with
For same effect. Which can then also mitigate any issues with value length limits. This practice that you can use comma-separated values or repeat header multiple times is pretty common. And with HTTP2 is compressed well. (BTW, I would rename |
Patches:
+Patch-Length:
with Patch-Lengths:
NOTE: We're currently discussing changing "Content-Length" to "Patch-Length" in #97 so to be clear: This issue relates to "Patch-Length" if we decide to adopt that header name.
Thanks to @toomim and @josephg's comments in #98, as well as discussion in #99, I've been thinking about the current spec implementing patches with a
Content-Length
(or maybePatch-Length
) header.I think we should move it to the Version-level header. This would simplify implementations like I wanted in #99 but provide all of the benefits of having Patches in the spec, as Mike would like.
So, concretely, I'm suggesting replacing "Patches" with "Patch-Lengths" and removing "Content-Length" from the patch-level headers, e.g. in a Request:
Implications:
Patch-Lengths
fieldThe text was updated successfully, but these errors were encountered: