| 216 | response.content_type = "text/event-stream; charset=utf-8"; |
| 217 | response.headers.emplace("X-Accel-Buffering", "no"); |
| 218 | response.stream_body = std::move(stream); |
| 219 | return response; |
| 220 | } |
| 221 | |
| 222 | HttpResponse chunked_audio_response(std::function<void(HttpStreamWriter &)> stream) { |
| 223 | HttpResponse response; |
| 224 | response.status = 200; |
| 225 | response.content_type = "application/octet-stream"; |
| 226 | response.stream_body = std::move(stream); |
| 227 | return response; |
| 228 | } |
| 229 | |
| 230 | bool is_wav_upload_filename(const std::string & filename) { |
no test coverage detected