From 038a6a3bb1363d6414bfdaac766bb50bbf7d16f6 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 21 Mar 2014 14:36:21 +0100 Subject: [PATCH] http_file: only supports HTTP GET MP-523 --- src/filter_http_file.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/filter_http_file.cpp b/src/filter_http_file.cpp index defac58..18bdd57 100644 --- a/src/filter_http_file.cpp +++ b/src/filter_http_file.cpp @@ -138,6 +138,13 @@ void yf::HttpFile::Rep::fetch_file(mp::Session &session, { mp::odr o(ODR_ENCODE); + if (strcmp(req->method, "GET")) + { + Z_GDU *gdu = o.create_HTTP_Response(session, req, 405); + package.response() = gdu; + return; + } + FILE *f = fopen(fname.c_str(), "rb"); if (!f) { -- 1.7.10.4