]> git.sesse.net Git - cubemap/commit
Fix handling of streams with no data.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 2 Feb 2014 23:25:41 +0000 (00:25 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 2 Feb 2014 23:25:41 +0000 (00:25 +0100)
commitc2080e598ec887ac7b087dbc287c42a14881d667
tree6e2447acfa3fd806f161ef0d628e6e08edc7a0b3
parent4c78d4cddfa8f5b9a9d275822237a0b1f8510dd2
Fix handling of streams with no data.

The original plan here was to let the client hang until we had
some headers to send (ie., first send an empty header and then
0 bytes data, and then send the client back from SENDING_DATA
to SENDING_HEADER as we got data).

However, as time went by, we started inserting stuff in the middle of the
headers ourselves, resulting in us sending pretty much a junk header.
Worse, this would be sent on to other relays, corrupting the version of
the Metacube stream.

Simply return 503 Not Available now instead if the stream is still
starting up; it's pretty much as good, and has fewer edge cases
to worry about.
server.cpp