commit 78ddde0cca53e19ad73fc9ef4d1b9b5d7fdcdcb9 from: Omar Polo date: Wed Apr 17 15:51:00 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 - 1df8adf959220912dba2187d7cf1b428868da4bb commit + 78ddde0cca53e19ad73fc9ef4d1b9b5d7fdcdcb9 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; } }