Commit 17436dc
committed
rfc24: add optional encoding override in data events
Problem: It is unnecessarily restrictive to require that all data
events for a particular stream are bound to a single encoding. Allowing
the encoding to be overridden per-event would allow easy escaping
of invalid characters on a per-event basis. Knowledge that a data
stream cannot be encoded using the header-specified encoding may not
be known until runtime, at which point it is too late to go back and
change the encoding type.
Specify that any encoding specified in the header event is the
"default" encoding for a stream, implying that the encoding might
be overridden.
Allow an optional "encoding" key in the data context object. If set,
this encoding will be considered to override the default encoding
for that stream, and will apply to the current data event only.1 parent 94f34ee commit 17436dc
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
0 commit comments