X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_http_file.cpp;h=18bdd571f83e27a1b0ccf0702807dff09b8de866;hb=4851938e09d4a6dd97fedbd077f11fb9b4d58f48;hp=64efa7291958bf7bd1d1dcaeeb368eab799db329;hpb=abb6c0e006a3701899adcfaaedba3be405df3248;p=metaproxy-moved-to-github.git diff --git a/src/filter_http_file.cpp b/src/filter_http_file.cpp index 64efa72..18bdd57 100644 --- a/src/filter_http_file.cpp +++ b/src/filter_http_file.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2013 Index Data + Copyright (C) Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -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) {