Return a proper Content-Type when streaming videos

Clients like Front Row expect video/<type> for video streaming, whereas iTunes
likes application/x-dmap-tagged when streaming audio.

Based on a patch by Ace Jones <ace.jones1@yahoo.com>.
This commit is contained in:
Julien BLACHE
2009-12-08 21:04:30 +01:00
parent df2cbea9b2
commit b9e7df5be3
2 changed files with 25 additions and 2 deletions

View File

@@ -1907,7 +1907,10 @@ daap_request(struct evhttp_request *req)
evhttp_add_header(req->output_headers, "Accept-Ranges", "bytes");
evhttp_add_header(req->output_headers, "DAAP-Server", "forked-daapd/" VERSION);
/* Content-Type for all replies, even the actual streaming */
/* Content-Type for all replies, even the actual audio streaming. Note that
* video streaming will override this Content-Type with a more appropriate
* video/<type> Content-Type as expected by clients like Front Row.
*/
evhttp_add_header(req->output_headers, "Content-Type", "application/x-dmap-tagged");
daap_handlers[handler].handler(req, evbuf, uri_parts, &query);