I've been toying around with this project on my RPi2 as a way of exploring the Balena concepts and got curious about the Content-Type 'multipart/x-mixed-replace' where a boundary is specified for each stream frame.
According to RFC 1341, section 7.2 The Multipart Content-Type, subsection 7.2.1 Multipart: The common syntax (Link: https://tools.ietf.org/html/rfc1341):
The encapsulation boundary is defined as a line consisting entirely of two hyphen characters ("-", decimal code 45) followed by the boundary parameter value from the Content-Type header field.
...
Thus, a typical multipart Content-Type header field might look like this:
This indicates that the entity consists of several parts, each itself with a structure that is syntactically identical to an RFC 822 message, except that the header area might be completely empty, and that the parts are each preceded by the line
I've been toying around with this project on my RPi2 as a way of exploring the Balena concepts and got curious about the Content-Type 'multipart/x-mixed-replace' where a boundary is specified for each stream frame.
According to RFC 1341, section 7.2 The Multipart Content-Type, subsection 7.2.1 Multipart: The common syntax (Link: https://tools.ietf.org/html/rfc1341):
The encapsulation boundary is defined as a line consisting entirely of two hyphen characters ("-", decimal code 45) followed by the boundary parameter value from the Content-Type header field.
...
Thus, a typical multipart Content-Type header field might look like this:
This indicates that the entity consists of several parts, each itself with a structure that is syntactically identical to an RFC 822 message, except that the header area might be completely empty, and that the parts are each preceded by the line
Thus, the server.py code:
Should be changed to:
Doesn't seem to be a big deal though, it seems to work pretty well regardless :)
Thank you for a bunch of great examples on how to use Balena!
Best regards Daniel