-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi
For the SharpRTSP Project (on github) I've implemented the protocol called RTSP-Over-HTTP which dates back to 1999.
The protocol uses a long running HTTP GET connection which requires the following
a) When the HTTP GET is received, we send a reply with HTTP Headers (there is no payload bytes to send yet) and leave the TCP socket open
b) The reply Header must not used Chunked Transfer and most not have a Content-Length. (It is based on HTTP/1.0)
c) At some point in the future we will write bytes to the OutputStream. It is not chunked. It is just raw bytes using a protocol where the receiver can determine the start/end of RTSP messages
I've made the changes and wanted to ask if a PR would be OK?
The changes are
- Allow ContentLength to be set to -1 (currently negative values will throw an exception)
- If the ContentLength is -1, we do not add ContentLength to the HTTP Headers
- Add a SendHeaders() function which works by doing Reply.OuputStream.Write() of Zero Bytes so HTTP Reply Headers are sent
Would you consider this as a PR, or is this changing the library too much?