equal
deleted
inserted
replaced
40 :params value: arbitrary number of Bytes |
40 :params value: arbitrary number of Bytes |
41 |
41 |
42 A blob of `params size` containing the serialized version of all stream level |
42 A blob of `params size` containing the serialized version of all stream level |
43 parameters. |
43 parameters. |
44 |
44 |
45 The blob contains a space separated list of parameters. |
45 The blob contains a space separated list of parameters. parameter with value |
46 |
46 are stored in the form `<name>=<value>`. |
47 Parameter value are not supported yet. |
|
48 |
47 |
49 Special character in param name are not supported yet. |
48 Special character in param name are not supported yet. |
50 |
49 |
51 Stream parameters use a simple textual format for two main reasons: |
50 Stream parameters use a simple textual format for two main reasons: |
52 |
51 |
114 yield '\0\0' |
113 yield '\0\0' |
115 |
114 |
116 def _paramchunk(self): |
115 def _paramchunk(self): |
117 """return a encoded version of all stream parameters""" |
116 """return a encoded version of all stream parameters""" |
118 blocks = [] |
117 blocks = [] |
119 for key, value in self._params: |
118 for par, value in self._params: |
120 # XXX no support for value yet |
|
121 assert value is None |
|
122 # XXX no escaping yet |
119 # XXX no escaping yet |
123 blocks.append(key) |
120 if value is not None: |
|
121 par = '%s=%s' % (par, value) |
|
122 blocks.append(par) |
124 return ' '.join(blocks) |
123 return ' '.join(blocks) |
125 |
124 |
126 class unbundle20(object): |
125 class unbundle20(object): |
127 """interpret a bundle2 stream |
126 """interpret a bundle2 stream |
128 |
127 |