diff --git a/src/Servers/GenHttpServer/Program.cs b/src/Servers/GenHttpServer/Program.cs index aafd975..d11139a 100644 --- a/src/Servers/GenHttpServer/Program.cs +++ b/src/Servers/GenHttpServer/Program.cs @@ -7,14 +7,21 @@ var port = (args.Length > 0 && ushort.TryParse(args[0], out var p)) ? p : (ushort)8080; +var rootMethods = new HashSet +{ + FlexibleRequestMethod.Get(RequestMethod.Get), + FlexibleRequestMethod.Get(RequestMethod.Head), + FlexibleRequestMethod.Get(RequestMethod.Options) +}; + var app = Inline.Create() .Post("/echo", (IRequest request) => Echo(request)) .Post((Stream body) => RequestContent(body)) - .Any(() => StringContent()); + .On(() => StringContent(), rootMethods); return await Host.Create() .Handler(app) - .Defaults() + .Defaults(rangeSupport: true) .Port(port) .RunAsync();