X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_http_file.cpp;h=18bdd571f83e27a1b0ccf0702807dff09b8de866;hb=4f7d8650b0ee4d2add656ad7657455232d5385f0;hp=defac589f25b0da47fc5928d86e90b0b46feb2d2;hpb=b02df3fd0849c5222081013420c18f949c55f9c5;p=metaproxy-moved-to-github.git 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) {