commit 8c61ad04ec88db3975dc53ba6e4d20ba8d604643 from: Omar Polo via: Thomas Adam date: Thu Apr 25 14:57:36 2024 UTC http-server: error on unknown method just for robustness; neither git nor got-fetch-http are expected to use other methods except for GET and POST. commit - 1ce583f009ec942f93fffd45f9bd671384c1439f commit + 8c61ad04ec88db3975dc53ba6e4d20ba8d604643 blob - e2f79c118a6b2944d1906b8da71c1546169d6525 blob + e9cb26e4d40d296c9874cae58ec8fcddcd322d04 --- regress/cmdline/http-server +++ regress/cmdline/http-server @@ -173,6 +173,12 @@ while (1) { handle_get($req, $client); } elsif ($req->method eq "POST") { handle_post($req, $client); + } else { + warn "unknown method ". $req->method . "\n"; + my $res = HTTP::Response->new(405, + "Method not Allowed"); + + last; } }