bundle2: error parts can exceed length limits and crash the server
Siddharth Agarwal
sid at less-broken.com
Mon Apr 3 23:51:08 EDT 2017
On 4/3/17 20:48, Gregory Szorc wrote:
>
> This sounds reasonable to me.
>
> This will likely require a new bundle2 part(s) in order to
> differentiate the behavior of the part. Alternatively, I suppose there
> could be a bundle2 capability identifying whether the peer understands
> error messages in payload chunks and we could recycle the part name.
> But I'm a fan of parts having strict, well-defined behavior that
> doesn't change over time because otherwise things are too complicated.
> So my vote is for a new part name/type.
So technically we could retrofit this into the existing parts by
following what I outlined. That's actually what I was thinking of doing.
We don't need a separate bundle2 capability or anything either.
Old clients + new server = will display the truncated message, still
better than today. The payload will simply be ignored.
New client + old server = can display the message from the param rather
than from the payload
What do you think?
- Siddharth
>
> - Siddharth
>
> [1]
> https://www.mercurial-scm.org/repo/hg/file/4.1.2/mercurial/wireproto.py#l1049
> <https://www.mercurial-scm.org/repo/hg/file/4.1.2/mercurial/wireproto.py#l1049>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> <mailto:Mercurial-devel at mercurial-scm.org>
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> <https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel>
>
>
More information about the Mercurial-devel
mailing list