Add NotFound to ASP Style

This commit is contained in:
Michael Nolan 2022-08-24 07:40:27 -05:00
parent 1877455f52
commit 86d1d12344
23 changed files with 26 additions and 18 deletions

View File

@ -7,4 +7,4 @@ build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Tesses.Http.Example
build_property.ProjectDir = /home/mike/Documents/Tesses.Http/Tesses.Http.Example/
build_property.ProjectDir = /home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http.Example/

View File

@ -7,4 +7,4 @@ build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Tesses.Http.KitchenSink
build_property.ProjectDir = /home/mike/Documents/Tesses.Http/Tesses.Http.KitchenSink/
build_property.ProjectDir = /home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http.KitchenSink/

View File

@ -1,3 +1,3 @@
is_global = true
build_property.RootNamespace = Tesses.Http.VFSCollection
build_property.ProjectDir = /home/mike/Documents/Tesses.Http/Tesses.Http.VFSCollection/
build_property.ProjectDir = /home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http.VFSCollection/

View File

@ -16,6 +16,10 @@ namespace Tesses.Http
public abstract class ASPEndpointRequestHandler : IRequestHandler
{
protected virtual void NotFound(ServerContext ctx)
{
}
protected virtual Stream GetPostFileStream(string name,string filename,string contentType)
{
return new MemoryStream();
@ -275,6 +279,7 @@ namespace Tesses.Http
___lazy_load_everything();
Dictionary<string,List<string>> args=new Dictionary<string, List<string>>();
MultipartParser parser=null;
bool handled=false;
foreach(var m in ___RouteMethods)
{
args.Clear();
@ -302,11 +307,14 @@ namespace Tesses.Http
}
m.Call(ctx,parser,args);
handled=true;
break;
}
}
if(!handled)
{
NotFound(ctx);
}
await Task.CompletedTask;
}
}

View File

@ -6,9 +6,9 @@
<PackageId>Tesses.Http</PackageId>
<Author>Mike Nolan</Author>
<Company>Tesses</Company>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
<Version>1.0.1</Version>
<AssemblyVersion>1.0.1</AssemblyVersion>
<FileVersion>1.0.1</FileVersion>
<Description>A Web Server/Client</Description>
<PackageTags>HTTP, WebServer, WebClient</PackageTags>
<RepositoryUrl>https://gitlab.tesses.cf/tesses50/tesses.http</RepositoryUrl>

View File

@ -7,7 +7,7 @@
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"Tesses.Http/1.0.0": {
"Tesses.Http/1.0.1": {
"dependencies": {
"MimeTypesMap": "1.0.8",
"NETStandard.Library": "2.0.3",
@ -42,7 +42,7 @@
}
},
"libraries": {
"Tesses.Http/1.0.0": {
"Tesses.Http/1.0.1": {
"type": "project",
"serviceable": false,
"sha512": ""

View File

@ -13,11 +13,11 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Tesses")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("A Web Server/Client")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.1")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1")]
[assembly: System.Reflection.AssemblyProductAttribute("Tesses.Http")]
[assembly: System.Reflection.AssemblyTitleAttribute("Tesses.Http")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.1")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://gitlab.tesses.cf/tesses50/tesses.http")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -1 +1 @@
ea81f4c5aa36132a8d98fd8f84bd055ee8efd423
e19720fae030b0b4a45f373e6fad8e5d168bf687

View File

@ -1 +1 @@
6ac073b0afc1b3fc2934cc42feca1de8e80d19d3
49567bbfdeef5c942182dce493f3c6aa22656b4c

View File

@ -5,7 +5,7 @@
},
"projects": {
"/home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http/Tesses.Http.csproj": {
"version": "1.0.0",
"version": "1.0.1",
"restore": {
"projectUniqueName": "/home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http/Tesses.Http.csproj",
"projectName": "Tesses.Http",

View File

@ -248,7 +248,7 @@
"/home/mike/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"version": "1.0.1",
"restore": {
"projectUniqueName": "/home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http/Tesses.Http.csproj",
"projectName": "Tesses.Http",

View File

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "84jwmFi3zgfL/NYUasnrlgO3RTp2WPp/ajWPJmaNlfWrGU2rVvy6VKS31rxuK4/5hdeSawlUwyMkVnhaXJzBIQ==",
"dgSpecHash": "CQ8ixWGPT64Amp0GG2UiGeU2/XIdXcSMLs4kQDsNMe91k5Xr6HKNQS0RAuVNj9EcA59Wn5HOdb3GcwOVeP87pQ==",
"success": true,
"projectFilePath": "/home/mike/Documents/Code/WorkingOn/Tesses.Http/Tesses.Http/Tesses.Http.csproj",
"expectedPackageFiles": [