From 21b0daf7f839b056a07c2818ee63e88c04593202 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Thu, 13 Mar 2014 15:40:56 +0400 Subject: [PATCH] Content-Type for .mp3 and .ogg files (used in Calm theme) --- src/bitcoinrpc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index f73d9580..e709321c 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1014,6 +1014,10 @@ void ServiceConnection(AcceptedConnection *conn) if( strURI.find(".jpg") != std::string::npos || strURI.find(".jpeg") != std::string::npos ) contentType = "image/jpeg"; + if( strURI.find(".mp3") != std::string::npos ) + contentType = "audio/mpeg"; + if( strURI.find(".ogg") != std::string::npos ) + contentType = "audio/ogg"; conn->stream() << HTTPReply(HTTP_OK, str, false, contentType) << std::flush; } else { printf("ServiceConnection: file %s not found\n", fname.c_str());