oddity-ai / oddity-rtsp

Oddity's suite of tools for handling RTSP streams.
Apache License 2.0
45 stars 8 forks source link

[RFC 4.4] Correctly implement determination of total message size #1

Closed gerwin3 closed 2 years ago

gerwin3 commented 2 years ago

From RFC 2326 - Section 4.4 Message Length:

   1.     Any response message which MUST NOT include a message body
          (such as the 1xx, 204, and 304 responses) is always terminated
          by the first empty line after the header fields, regardless of
          the entity-header fields present in the message. (Note: An
          empty line consists of only CRLF.)

   2.     If a Content-Length header field section 12.14 is present,
          its value in bytes represents the length of the message-body.
          If this header field is not present, a value of zero is
          assumed.

   3.     By the server closing the connection. (Closing the connection
          cannot be used to indicate the end of a request body, since
          that would leave no possibility for the server to send back a
          response.)
gerwin3 commented 2 years ago

Note that 1 and 3 only apply for client implementations.