From 9245e282e8f61835f9d0982b098e1b3e14417d40 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Fri, 13 May 2005 05:09:03 +0000 Subject: [PATCH] transcode fix -- wrong content type for transcoded files --- src/dispatch.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dispatch.c b/src/dispatch.c index 755d2da4..8db3abed 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -642,9 +642,17 @@ void dispatch_stream(WS_CONNINFO *pwsc, DBQUERYINFO *pqi) { config_set_status(pwsc,pqi->session_id,NULL); db_dispose_item(pmp3); } else { + // The type should really be determined by the transcoding + // function -- it's possible that you want to transcode + // to a lower-bitrate mp3 or something... but for now, + // we'll just assume .wav + ws_addresponseheader(pwsc,"Content-Type","audio/wav"); + + /* if(pmp3->type) ws_addresponseheader(pwsc,"Content-Type","audio/%s", pmp3->type); + */ // Also content-length -heade would be nice, but since // we don't really know it here, so let's leave it out. ws_addresponseheader(pwsc,"Connection","Close");