[MERGE] Implement chunked body encoding for the smart protocol.
John Arbash Meinel
john at arbash-meinel.com
Sat Nov 10 12:00:34 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
>> ...
>> +For compatibility will all versions (past and future) of bzr clients,
>> +servers that receive a request in an unknown protocol version should
>> +respond with a single-line error terminated with 0x0a (NEWLINE), rather
>> +than structured response prefixed with a version string.
>>
>> ^- Since we are asserting that this should be the official way of handling
>> unknown protocol failures, I would like us to get this right, rather than
>> restricting ourselves to how early versions of the protocol worked.
>>
>> I'm fine with breaking compatibility with 0.11 clients as long as there is
>> a clear win in error clarity. (I'd probably rather avoid breaking 0.92
>> clients, but we should consider a migration plan if possible.)
>
> Well, what improvement in clarity do you want that this restriction prevents?
>
> I'm happy to loosen this if we think it's worth it, but a new-line terminated
> string for this case seems adequate, and provides an ok result for even ancient
> bzr versions.
>
> We can always change this specification later if we decide to change this
> policy. In the meantime it's good to have the rationale for the current state
> of the protocol clear.
I haven't thought it through completely. Though you did make sure that chunked
errors have a set of "CHUNKS" associated with them. Because you felt you needed
more than just plain error handling.
...
>> ^- How are these 'b\n' rather than '11\nfirst chunk'...
>> Is there something I'm missing? (Certainly the number could be in hex,
>> though I don't quite understand why we want to do that.)
>
> It's in hex.
>
> It could be in decimal instead, but I don't quite understand why we'd want to do
> that ;)
>
> -Andrew.
Just because it makes the tests more understandable would usually be enough for
me. But it isn't something that I would make block the merge.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHNZ1hJdeBCYSNAAMRAmL9AKCSG7vaQISRD/XiAOLMX4UhySdwggCdHf3v
lDuJNRoWWQxro6uuGDo13ow=
=P9qO
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list