You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Gloss to decode different types of repeated headers, often following the Internet Message (RFC-5322) style.
Given the simple case of a repeated header in the style "key:value\r\n" where the total section is delimited by "\r\n\r\n", I can decode fine with a codec like:
i.e. Leave the repeated section delimiter to be consumed by the inner codec.
Decoding is fine, the problem is when encoding Gloss will emit a delimiter for each inner header, "\r\n", then the delimiter for the repeated section "\r\n\r\n", leaving me with one too many "\r\n\r\n"
While I'm not actually encoding headers, I thought it might be a nice addition to be able to specify the encoding-delimiter for a repeated section:
Hi Zach,
I'm using Gloss to decode different types of repeated headers, often following the Internet Message (RFC-5322) style.
Given the simple case of a repeated header in the style "key:value\r\n" where the total section is delimited by "\r\n\r\n", I can decode fine with a codec like:
i.e. Leave the repeated section delimiter to be consumed by the inner codec.
Decoding is fine, the problem is when encoding Gloss will emit a delimiter for each inner header, "\r\n", then the delimiter for the repeated section "\r\n\r\n", leaving me with one too many "\r\n\r\n"
While I'm not actually encoding headers, I thought it might be a nice addition to be able to specify the encoding-delimiter for a repeated section:
If this is agreeable I'd be happy to supply a pull-request for you.
More information here:
http://derek.troywest.com/articles/by-example-gloss/#basic-limitations
Thanks,
Derek
The text was updated successfully, but these errors were encountered: