diff mercurial/wireprotoframing.py @ 37299:e9aadee698cf

wireproto: add frame flag to denote payloads as CBOR We may eventually want a separate frame type for this. But for now this is the easiest to implement. Differential Revision: https://phab.mercurial-scm.org/D2986
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 28 Mar 2018 13:30:24 -0700
parents 5ef2da00e935
children 36d17f37db91
line wrap: on
line diff
--- a/mercurial/wireprotoframing.py	Wed Mar 28 13:01:28 2018 -0700
+++ b/mercurial/wireprotoframing.py	Wed Mar 28 13:30:24 2018 -0700
@@ -79,10 +79,12 @@
 
 FLAG_BYTES_RESPONSE_CONTINUATION = 0x01
 FLAG_BYTES_RESPONSE_EOS = 0x02
+FLAG_BYTES_RESPONSE_CBOR = 0x04
 
 FLAGS_BYTES_RESPONSE = {
     b'continuation': FLAG_BYTES_RESPONSE_CONTINUATION,
     b'eos': FLAG_BYTES_RESPONSE_EOS,
+    b'cbor': FLAG_BYTES_RESPONSE_CBOR,
 }
 
 FLAG_ERROR_RESPONSE_PROTOCOL = 0x01