diff --git a/src/Test.HostBuilder/Program.cs b/src/Test.HostBuilder/Program.cs index f89a07c..58e025f 100644 --- a/src/Test.HostBuilder/Program.cs +++ b/src/Test.HostBuilder/Program.cs @@ -41,19 +41,19 @@ public static void Main(string[] args) .MapContentRoute("/preauth/content", false, false) .MapStaticRoute(HttpMethod.GET, "/preauth/static", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from pre-authentication static route /preauth/static"); + Console.WriteLine("| Responding from pre-authentication static route /preauth/static"); await ctx.Response.Send(); return; }, false) .MapParameteRoute(HttpMethod.GET, "/preauth/parameter/{id}", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]); + Console.WriteLine("| Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]); await ctx.Response.Send(); return; }, false) .MapDynamicRoute(HttpMethod.GET, new Regex("^/preauth/dynamic/\\d+$"), async (HttpContextBase ctx) => { - Console.WriteLine("Responding from pre-authentication dynamic route /preauth/dynamic"); + Console.WriteLine("| Responding from pre-authentication dynamic route /preauth/dynamic"); await ctx.Response.Send(); return; }, false) @@ -61,19 +61,19 @@ public static void Main(string[] args) .MapContentRoute("/postauth/content", false, true) .MapStaticRoute(HttpMethod.GET, "/postauth/static", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from post-authentication static route /postauth/static"); + Console.WriteLine("| Responding from post-authentication static route /postauth/static"); await ctx.Response.Send(); return; }, false) .MapParameteRoute(HttpMethod.GET, "/postauth/parameter/{id}", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]); + Console.WriteLine("| Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]); await ctx.Response.Send(); return; }, false) .MapDynamicRoute(HttpMethod.GET, new Regex("^/postauth/dynamic/\\d+$"), async (HttpContextBase ctx) => { - Console.WriteLine("Responding from post-authentication dynamic route /postauth/dynamic"); + Console.WriteLine("| Responding from post-authentication dynamic route /postauth/dynamic"); await ctx.Response.Send(); return; }, false) @@ -88,19 +88,19 @@ public static void Main(string[] args) .MapContentRoute("/preauth/content", false, false) .MapStaticRoute(HttpMethod.GET, "/preauth/static", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from pre-authentication static route /preauth/static"); + Console.WriteLine("| Responding from pre-authentication static route /preauth/static"); await ctx.Response.Send(); return; }, false) .MapParameteRoute(HttpMethod.GET, "/preauth/parameter/{id}", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]); + Console.WriteLine("| Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]); await ctx.Response.Send(); return; }, false) .MapDynamicRoute(HttpMethod.GET, new Regex("^/preauth/dynamic/\\d+$"), async (HttpContextBase ctx) => { - Console.WriteLine("Responding from pre-authentication dynamic route /preauth/dynamic"); + Console.WriteLine("| Responding from pre-authentication dynamic route /preauth/dynamic"); await ctx.Response.Send(); return; }, false) @@ -108,19 +108,19 @@ public static void Main(string[] args) .MapContentRoute("/postauth/content", false, true) .MapStaticRoute(HttpMethod.GET, "/postauth/static", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from post-authentication static route /postauth/static"); + Console.WriteLine("| Responding from post-authentication static route /postauth/static"); await ctx.Response.Send(); return; }, false) .MapParameteRoute(HttpMethod.GET, "/postauth/parameter/{id}", async (HttpContextBase ctx) => { - Console.WriteLine("Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]); + Console.WriteLine("| Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]); await ctx.Response.Send(); return; }, false) .MapDynamicRoute(HttpMethod.GET, new Regex("^/postauth/dynamic/\\d+$"), async (HttpContextBase ctx) => { - Console.WriteLine("Responding from post-authentication dynamic route /postauth/dynamic"); + Console.WriteLine("| Responding from post-authentication dynamic route /postauth/dynamic"); await ctx.Response.Send(); return; }, false) @@ -159,6 +159,7 @@ public static void Main(string[] args) using (RestResponse resp = req.Send()) { Console.WriteLine("Received response: " + resp.StatusCode); + Task.Delay(1000).Wait(); } } } @@ -166,7 +167,7 @@ public static void Main(string[] args) private static async Task AuthenticationRoute(HttpContextBase @base) { - Console.WriteLine("In authentication"); + Console.WriteLine("| In authentication"); } static void ExceptionEncountered(object sender, ExceptionEventArgs args) @@ -193,17 +194,16 @@ static async Task DefaultRoute(HttpContextBase ctx) { try { - Console.WriteLine("Responding from the default route"); + Console.WriteLine("| Responding from the default route"); ctx.Response.Headers.Add("Connection", "close"); ctx.Response.StatusCode = 200; ctx.Response.ContentType = "text/plain"; await ctx.Response.Send("Default route"); - _Server.Events.Logger(_Server.Serializer.SerializeJson(ctx, true)); return; } catch (Exception e) { - Console.WriteLine(_Server.Serializer.SerializeJson(e, true)); + Console.WriteLine(e.ToString()); ctx.Response.StatusCode = 500; await ctx.Response.Send(); return; diff --git a/src/WatsonWebserver.Core/WatsonWebserver.Core.csproj b/src/WatsonWebserver.Core/WatsonWebserver.Core.csproj index 4a41a2f..1b71254 100644 --- a/src/WatsonWebserver.Core/WatsonWebserver.Core.csproj +++ b/src/WatsonWebserver.Core/WatsonWebserver.Core.csproj @@ -1,10 +1,10 @@ - + netstandard2.1;net462;net48;net6.0;net7.0 True ..\WatsonWebserver.snk - Watson.Core + Watson.WebserverCore Watson Webserver Core Joel Christner Watson.Core @@ -21,6 +21,7 @@ LICENSE.md True snupkg + True @@ -28,41 +29,47 @@ - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml - WatsonWebserver.xml + WatsonWebserver.Core.xml + + + Always + + + True @@ -83,9 +90,13 @@ - + True \ + Always + + + Always diff --git a/src/WatsonWebserver.Core/WatsonWebserver.xml b/src/WatsonWebserver.Core/WatsonWebserver.xml deleted file mode 100644 index 21f5b04..0000000 --- a/src/WatsonWebserver.Core/WatsonWebserver.xml +++ /dev/null @@ -1,2082 +0,0 @@ - - - - WatsonWebserver.Core - - - - - Access control manager. Dictates which connections are permitted or denied. - - - - - Matcher to match denied addresses. - - - - - Matcher to match permitted addresses. - - - - - Access control mode, either DefaultPermit or DefaultDeny. - DefaultPermit: allow everything, except for those explicitly denied. - DefaultDeny: deny everything, except for those explicitly permitted. - - - - - Instantiate. - - Access control mode. - - - - Permit or deny a request based on IP address. - When operating in 'default deny', only specified entries are permitted. - When operating in 'default permit', everything is allowed unless explicitly denied. - - The IP address to evaluate. - True if permitted. - - - - Access control mode of operation. - - - - - Permit requests from any endpoint by default. - - - - - Deny requests from any endpoint by default. - - - - - A chunk of data, used when reading from a request where the Transfer-Encoding header includes 'chunked'. - - - - - Length of the data. - - - - - Data. - - - - - Any additional metadata that appears on the length line after the length hex value and semicolon. - - - - - Indicates whether or not this is the final chunk, i.e. the chunk length received was zero. - - - - - Instantiate. - - - - - Connection event arguments. - - - - - Requestor IP address. - - - - - Request TCP port. - - - - - Instantiate. - - Requestor IP address. - Request TCP port. - - - - Assign a method handler for when requests are received matching the supplied method and path. - - - - - Globally-unique identifier. - - - - - The pattern against which the raw URL should be matched. - - - - - Indicates whether or not the path specifies a directory. If so, any matching URL will be handled by the specified handler. - - - - - User-supplied metadata. - - - - - Create a new route object. - - The pattern against which the raw URL should be matched. - Indicates whether or not the path specifies a directory. If so, any matching URL will be handled by the specified handler. - Globally-unique identifier. - User-supplied metadata. - - - - Content route handler. Handles GET and HEAD requests to content routes for files and directories. - - - - - The FileMode value to use when accessing files within a content route via a FileStream. Default is FileMode.Open. - - - - - The FileAccess value to use when accessing files within a content route via a FileStream. Default is FileAccess.Read. - - - - - The FileShare value to use when accessing files within a content route via a FileStream. Default is FileShare.Read. - - - - - Method to invoke to process a content route request. - - - - - Instantiate. - - Content route manager. - - - - Content route manager. Content routes are used for GET and HEAD requests to specific files or entire directories. - - - - - Base directory for files and directories accessible via content routes. - - - - - Instantiate the object. - - - - - Add a route. - - URL path, i.e. /path/to/resource. - True if the path represents a directory. - Globally-unique identifier. - User-supplied metadata. - - - - Remove a route. - - URL path. - - - - Retrieve a content route. - - URL path. - ContentRoute if the route exists, otherwise null. - - - - Check if a content route exists. - - URL path. - True if exists. - - - - Retrieve a content route. - - URL path. - Matching route. - True if a match exists. - - - - Default serialization helper. - - - - - Deserialize JSON to an instance. - - Type. - JSON string. - Instance. - - - - Serialize object to JSON. - - Object. - Pretty print. - JSON. - - - - Assign a method handler for when requests are received matching the supplied method and path regex. - - - - - Globally-unique identifier. - - - - - The HTTP method, i.e. GET, PUT, POST, DELETE, etc. - - - - - The pattern against which the raw URL should be matched. - - - - - The handler for the dynamic route. - - - - - User-supplied metadata. - - - - - Create a new route object. - - The HTTP method, i.e. GET, PUT, POST, DELETE, etc. - The pattern against which the raw URL should be matched. - The method that should be called to handle the request. - Globally-unique identifier. - User-supplied metadata. - - - - Dynamic route manager. Dynamic routes are used for requests using any HTTP method to any path that can be matched by regular expression. - - - - - Directly access the underlying regular expression matching library. - This is helpful in case you want to specify the matching behavior should multiple matches exist. - - - - - Instantiate the object. - - - - - Add a route. - - The HTTP method. - URL path, i.e. /path/to/resource. - Method to invoke. - Globally-unique identifier. - User-supplied metadata. - - - - Remove a route. - - The HTTP method. - URL path. - - - - Check if a content route exists. - - The HTTP method. - URL path. - True if exists. - - - - Match a request method and URL to a handler method. - - The HTTP method. - URL path. - Matching route. - Method to invoke. - - - - Exception event arguments. - - - - - IP address. - - - - - Port number. - - - - - HTTP method. - - - - - URL. - - - - - Request query. - - - - - Request headers. - - - - - Content length. - - - - - Response status. - - - - - Response headers. - - - - - Response content length. - - - - - Exception. - - - - - Instantiate. - - Context. - Exception. - - - - HTTP context including both request and response. - - - - - UTC timestamp from when the context object was created. - - - - - The HTTP request that was received. - - - - - Type of route. - - - - - Matched route. - - - - - Globally-unique identifier for the context. - - - - - Cancellation token source. - - - - - Cancellation token. - - - - - The HTTP response that will be sent. This object is preconstructed on your behalf and can be modified directly. - - - - - User-supplied metadata. - - - - - HTTP methods, i.e. GET, PUT, POST, DELETE, etc. - - - - - HTTP GET. - - - - - HTTP HEAD. - - - - - HTTP PUT. - - - - - HTTP POST. - - - - - HTTP DELETE. - - - - - HTTP PATCH. - - - - - HTTP CONNECT. - - - - - HTTP OPTIONS. - - - - - HTTP TRACE. - - - - - Unknown method. - - - - - HTTP request. - - - - - UTC timestamp from when the request object was received. - - - - - Globally-unique identifier for the request. - - - - - Thread ID on which the request exists. - - - - - The protocol and version. - - - - - Source (requestor) IP and port information. - - - - - Destination IP and port information. - - - - - The HTTP method used in the request. - - - - - The string version of the HTTP method, useful if Method is UNKNOWN. - - - - - URL details. - - - - - Query details. - - - - - The headers found in the request. - - - - - Specifies whether or not the client requested HTTP keepalives. - - - - - Indicates whether or not chunked transfer encoding was detected. - - - - - Indicates whether or not the payload has been gzip compressed. - - - - - Indicates whether or not the payload has been deflate compressed. - - - - - The useragent specified in the request. - - - - - The content type as specified by the requestor (client). - - - - - The number of bytes in the request body. - - - - - The stream from which to read the request body sent by the requestor (client). - - - - - Retrieve the request body as a byte array. This will fully read the stream. - - - - - Retrieve the request body as a string. This will fully read the stream. - - - - - For chunked transfer-encoded requests, read the next chunk. - It is strongly recommended that you use the ChunkedTransfer parameter before invoking this method. - - Cancellation token useful for canceling the request. - Chunk. - - - - Determine if a header exists. - - Header key. - True if exists. - - - - Determine if a querystring entry exists. - - Querystring key. - True if exists. - - - - Retrieve a header (or querystring) value. - - Key. - Value. - - - - Retrieve a querystring value. - - Key. - Value. - - - - Source details. - - - - - IP address of the requestor. - - - - - TCP port from which the request originated on the requestor. - - - - - Source details. - - - - - Source details. - - IP address of the requestor. - TCP port from which the request originated on the requestor. - - - - Destination details. - - - - - IP address to which the request was made. - - - - - TCP port on which the request was received. - - - - - Hostname to which the request was directed. - - - - - Hostname elements. - - - - - Destination details. - - - - - Source details. - - IP address to which the request was made. - TCP port on which the request was received. - Hostname. - - - - URL details. - - - - - Full URL. - - - - - Raw URL with query. - - - - - Raw URL without query. - - - - - Raw URL elements. - - - - - Parameters found within the URL, if using parameter routes. - - - - - URL details. - - - - - URL details. - - Full URL. - Raw URL. - - - - Query details. - - - - - Querystring, excluding the leading '?'. - - - - - Query elements. - - - - - Query details. - - - - - Query details. - - Full URL. - - - - HTTP response. - - - - - UTC timestamp from when the response object was created. - - - - - The protocol and version. - - - - - The HTTP status code to return to the requestor (client). - - - - - The HTTP status description to return to the requestor (client). - - - - - User-supplied headers to include in the response. - - - - - User-supplied content-type to include in the response. - - - - - The length of the supplied response data. - - - - - Indicates whether or not chunked transfer encoding should be indicated in the response. - - - - - Retrieve the response body sent using a Send() or SendAsync() method. - - - - - Retrieve the response body sent using a Send() or SendAsync() method. - - - - - Response data stream sent to the requestor. - - - - - Boolean indicating if the response has been sent. - - - - - Send headers and no data to the requestor and terminate the connection. - - Cancellation token useful for canceling the request. - True if successful. - - - - Send headers with a specified content length and no data to the requestor and terminate the connection. Useful for HEAD requests where the content length must be set. - - Cancellation token useful for canceling the request. - Content length. - True if successful. - - - - Send headers and data to the requestor and terminate the connection. - - Data. - Cancellation token useful for canceling the request. - True if successful. - - - - Send headers and data to the requestor and terminate the connection. - - Data. - Cancellation token useful for canceling the request. - True if successful. - - - - Send headers and data to the requestor and terminate. - - Number of bytes to send. - Stream containing the data. - Cancellation token useful for canceling the request. - True if successful. - - - - Send headers (if not already sent) and a chunk of data using chunked transfer-encoding, and keep the connection in-tact. - - Chunk of data. - Cancellation token useful for canceling the request. - True if successful. - - - - Send headers (if not already sent) and the final chunk of data using chunked transfer-encoding and terminate the connection. - - Chunk of data. - Cancellation token useful for canceling the request. - True if successful. - - - - Host builder interface. - - Host builder. - Input action. - - - - Map the pre-flight route. - - Handler. - Host builder. - - - - Map the pre-routing route. - - Handler. - Host builder. - - - - Map an authentication route. - - Handler. - Host builder. - - - - Map the default route. - - Handler. - Host builder. - - - - Map the post-routing route. - - Handler. - Host builder. - - - - Map a content route. - - Route path. - Flag to indicate if the path is a directory. - Flag to indicate whether or not the route requires authentication. - Host builder. - - - - Apply a content handler. - - Content route handler. - Flag to indicate whether or not the route requires authentication. - Host builder. - - - - Apply a static route. - - HTTP method. - Route path. - Action. - Flag to indicate whether or not the route requires authentication. - Host builder. - - - - Apply a parameter route. - - HTTP method. - Route path. - Action. - Flag to indicate whether or not the route requires authentication. - Host builder. - - - - Apply a dynamic route. - - HTTP method. - Regular expression. - Action. - Flag to indicate whether or not the route requires authentication. - Host builder. - - - - Serialization helper. - - - - - Deserialize from JSON to an object of the specified type. - - Type. - JSON string. - Instance. - - - - Serialize from object to JSON. - - Object. - Pretty print. - JSON. - - - - MIME types and file extensions. - - - - - Instantiates the object. - - - - - Retrieve MIME type from file extension. - - File extension. - String containing MIME type. - - - - Assign a method handler for when requests are received matching the supplied method and path containing parameters. - - - - - Globally-unique identifier. - - - - - The HTTP method, i.e. GET, PUT, POST, DELETE, etc. - - - - - The pattern against which the raw URL should be matched. - - - - - The handler for the parameter route. - - - - - User-supplied metadata. - - - - - Create a new route object. - - The HTTP method, i.e. GET, PUT, POST, DELETE, etc. - The pattern against which the raw URL should be matched. - The method that should be called to handle the request. - Globally-unique identifier. - User-supplied metadata. - - - - Parameter route manager. Parameter routes are used for requests using any HTTP method to any path where parameters are defined in the URL. - For example, /{version}/api. - For a matching URL, the HttpRequest.Url.Parameters will contain a key called 'version' with the value found in the URL. - - - - - Directly access the underlying URL matching library. - This is helpful in case you want to specify the matching behavior should multiple matches exist. - - - - - Instantiate the object. - - - - - Add a route. - - The HTTP method. - URL path, i.e. /path/to/resource. - Method to invoke. - Globally-unique identifier. - User-supplied metadata. - - - - Remove a route. - - The HTTP method. - URL path. - - - - Retrieve a parameter route. - - The HTTP method. - URL path. - ParameterRoute if the route exists, otherwise null. - - - - Check if a content route exists. - - The HTTP method. - URL path. - True if exists. - - - - Match a request method and URL to a handler method. - - The HTTP method. - URL path. - Values extracted from the URL. - Matching route. - True if match exists. - - - - Request event arguments. - - - - - IP address. - - - - - Port number. - - - - - HTTP method. - - - - - URL. - - - - - Query found in the URL. - - - - - Request headers. - - - - - Content length. - - - - - Instantiate. - - - - - - Response event arguments. - - - - - IP address. - - - - - Port number. - - - - - HTTP method. - - - - - URL. - - - - - Request query. - - - - - Request headers. - - - - - Content length. - - - - - Response status. - - - - - Response headers. - - - - - Response content length. - - - - - Total time in processing the request and sending the response, in milliseconds. - - - - - Instantiate. - - Context. - Total milliseconds. - - - - Route type. - - - - - Default route. - - - - - Content route. - - - - - Static route. - - - - - Parameter route. - - - - - Dynamic route. - - - - - Routing group. - - - - - Static routes. - - - - - Content routes. - - - - - Handler for content route requests. - - - - - Parameter routes. - - - - - Dynamic routes. - - - - - Instantiate. - - - - - Assign a method handler for when requests are received matching the supplied method and path. - - - - - Globally-unique identifier. - - - - - The HTTP method, i.e. GET, PUT, POST, DELETE, etc. - - - - - The raw URL, i.e. /foo/bar/. Be sure this begins and ends with '/'. - - - - - The handler for the static route. - - - - - User-supplied metadata. - - - - - Create a new route object. - - The HTTP method, i.e. GET, PUT, POST, DELETE, etc. - The raw URL, i.e. /foo/bar/. Be sure this begins and ends with '/'. - The method that should be called to handle the request. - Globally-unique identifier. - User-supplied metadata. - - - - Static route manager. Static routes are used for requests using any HTTP method to a specific path. - - - - - Instantiate the object. - - - - - Add a route. - - The HTTP method. - URL path, i.e. /path/to/resource. - Method to invoke. - Globally-unique identifier. - User-supplied metadata. - - - - Remove a route. - - The HTTP method. - URL path. - - - - Retrieve a static route. - - The HTTP method. - URL path. - StaticRoute if the route exists, otherwise null. - - - - Check if a static route exists. - - The HTTP method. - URL path. - True if exists. - - - - Match a request method and URL to a handler method. - - The HTTP method. - URL path. - Matching route. - Method to invoke. - - - - Webserver base. - - - - - Indicates whether or not the server is listening. - - - - - Number of requests being serviced currently. - - - - - Webserver settings. - - - - - Webserver routes. - - - - - Webserver statistics. - - - - - Set specific actions/callbacks to use when events are raised. - - - - - Default pages served by Watson webserver. - - - - - JSON serialization helper. - - - - - Creates a new instance of the webserver. - If you do not provide a settings object, default settings will be used, which will cause the webserver to listen on http://127.0.0.1:8000, and send events to the console. - - Webserver settings. - Method used when a request is received and no matching routes are found. Commonly used as the 404 handler when routes are used. - - - - Creates a new instance of the Watson webserver. - - Hostname or IP address on which to listen. - TCP port on which to listen. - Specify whether or not SSL should be used (HTTPS). - Method used when a request is received and no matching routes are found. Commonly used as the 404 handler when routes are used. - - - - Dispose of resources. - - - - - Start accepting new connections. - - Cancellation token useful for canceling the server. - - - - Start accepting new connections. - - Cancellation token useful for canceling the server. - Task. - - - - Stop accepting new connections. - - - - - Webserver constants. - - - - - Content type text. - - - - - Content type HTML. - - - - - Content type JSON. - - - - - Content type XML. - - - - - HTML content for a 400 response. - - - - - HTML content for a 404 response. - - - - - HTML content for a 500 response. - - - - - Header for access-control-allow-origin. - - - - - Header for access-control-allow-methods. - - - - - Header for access-control-allow-headers. - - - - - Header for access-control-expose-headers. - - - - - Header for accept. - - - - - Header for accept-language. - - - - - Header for accept-charset. - - - - - Header for cache control. - - - - - Header for connection. - - - - - Header for content length. - - - - - Header for content type. - - - - - Header for date. - - - - - DateTime format for date header. - - - - - Header for host. - - - - - Header for transfer encoding. - - - - - Callbacks/actions to use when various events are encountered. - - - - - Method to use for sending log messages. - - - - - Event to fire when a connection is received. - - - - - Event to fire when a connection is denied. - This event is not used by WatsonWebserver, only WatsonWebserver.Lite. - - - - - Event to fire when a request is received. - - - - - Event to fire when a request is denied due to access control. - - - - - Event to fire when a requestor disconnected unexpectedly. - - - - - Event to fire when a response is sent. - - - - - Event to fire when an exception is encountered. - - - - - Event to fire when the server is started. - - - - - Event to fire when the server is stopped. - - - - - Event to fire when the server is being disposed. - - - - - Instantiate the object. - - - - - Handle connection received event. - - Sender. - Args. - - - - Handle connection denied event. - This event is not used by WatsonWebserver, only WatsonWebserver.Lite. - - Sender. - Args. - - - - Handle request received event. - - Sender. - Args. - - - - Handle request denied event. - - Sender. - Args. - - - - Handle response sent event. - - Sender. - Args. - - - - Handle exception encountered event. - - Sender. - Args. - - - - Handle server started event. - - Sender. - Args. - - - - Handle server stopped event. - - Sender. - Args. - - - - Handle server disposing event. - - Sender. - Args. - - - - Default pages served. - - - - - Pages by status code. - - - - - Default pages served by Watson webserver. - - - - - Page served by Watson webserver. - - - - - Content type. - - - - - Content. - - - - - Page served by Watson webserver. - - Content type. - Content. - - - - Route manager. - - - - - Method to invoke when an OPTIONS request is received. - - - - - Method to invoke prior to routing. - - - - - Pre-authentication routes. - - - - - Method to invoke to authenticate a request. - Attach any session-related metadata to the HttpContextBase.Metadata property. - - - - - Post-authentication routes. - - - - - Default route, when no other routes are available. - - - - - Method invoked after routing, primarily to emit logging and telemetry. - - - - - Instantiate. - - - - - Instantiate. - - Settings. - Default route. - - - - Webserver settings. - - - - - Hostname on which to listen. - - - - - TCP port on which to listen. - - - - - Listener prefix, of the form 'http[s]://[hostname]:[port]/. - - - - - Input-output settings. - - - - - SSL settings. - - - - - Headers that will be added to every response unless previously set. - - - - - Access control manager, i.e. default mode of operation, permit list, and deny list. - - - - - Debug logging settings. - Be sure to set Events.Logger in order to receive debug messages. - - - - - Webserver settings. - - - - - Webserver settings. - - The hostname on which to listen. - The port on which to listen. - Enable or disable SSL. - - - - Input-output settings. - - - - - Buffer size to use when interacting with streams. - - - - - Maximum number of concurrent requests. - - - - - Read timeout, in milliseconds. - This property is only used by WatsonWebserver.Lite. - - - - - Maximum incoming header size, in bytes. - This property is only used by WatsonWebserver.Lite. - - - - - Flag indicating whether or not the server requests a persistent connection. - - - - - Input-output settings. - - - - - SSL settings. - - - - - Enable or disable SSL. - - - - - Certifcate for SSL. - For WatsonWebserver, install the certificate in your operating system. This property is not used by WatsonWebserver, only WatsonWebserver.Lite. - - - - - PFX certificate filename. - For WatsonWebserver, install the certificate in your operating system. This property is not used by WatsonWebserver, only WatsonWebserver.Lite. - - - - - PFX certificate password. - For WatsonWebserver, install the certificate in your operating system. This property is not used by WatsonWebserver, only WatsonWebserver.Lite. - - - - - Require mutual authentication. - This property is not used by WatsonWebserver, only WatsonWebserver.Lite. - - - - - Accept invalid certificates including self-signed and those that are unable to be verified. - This property is not used by WatsonWebserver, only WatsonWebserver.Lite. - - - - - SSL settings. - - - - - Header settings. - - - - - Automatically set content length if not already set. - - - - - Headers to add to each request. - - - - - Headers that will be added to every response unless previously set. - - - - - Debug logging settings. - Be sure to set Events.Logger in order to receive debug messages. - - - - - Enable or disable debug logging of access control. - - - - - Enable or disable debug logging of routing. - - - - - Enable or disable debug logging of requests. - - - - - Enable or disable debug logging of responses. - - - - - Debug logging settings. - Be sure to set Events.Logger in order to receive debug messages. - - - - - Webserver statistics. - - - - - The time at which the client or server was started. - - - - - The amount of time which the client or server has been up. - - - - - The number of payload bytes received (incoming request body). - - - - - The number of payload bytes sent (outgoing request body). - - - - - Initialize the statistics object. - - - - - Human-readable version of the object. - - String. - - - - Reset statistics other than StartTime and UpTime. - - - - - Increment request counter. - - HTTP method. - - - - Increment received payload bytes. - - Length. - - - - Increment sent payload bytes. - - Length. - - - diff --git a/src/WatsonWebserver.Lite/WatsonWebserver.Lite.csproj b/src/WatsonWebserver.Lite/WatsonWebserver.Lite.csproj index 8fdc1ca..7d37b2d 100644 --- a/src/WatsonWebserver.Lite/WatsonWebserver.Lite.csproj +++ b/src/WatsonWebserver.Lite/WatsonWebserver.Lite.csproj @@ -4,7 +4,7 @@ netstandard2.1;net462;net48;net6.0;net7.0 true true - 6.0.0 + 6.0.1 Simple, fast, async C# web server for handling REST requests with SSL support, targeted to .NET Core, .NET Standard, and .NET Framework. Watson.Lite has no dependency on http.sys. Joel Christner Joel Christner @@ -73,8 +73,9 @@ - + + @@ -93,10 +94,6 @@ - - - - Always diff --git a/src/WatsonWebserver/WatsonWebserver.csproj b/src/WatsonWebserver/WatsonWebserver.csproj index 02e6f9b..e8b1cf6 100644 --- a/src/WatsonWebserver/WatsonWebserver.csproj +++ b/src/WatsonWebserver/WatsonWebserver.csproj @@ -4,7 +4,7 @@ netstandard2.1;net462;net48;net6.0;net7.0 true true - 6.0.0 + 6.0.1 Simple, fast, async C# web server for handling REST requests with SSL support, targeted to .NET Core, .NET Standard, and .NET Framework. Joel Christner Joel Christner @@ -72,8 +72,9 @@ - + + @@ -92,10 +93,6 @@ - - - - Always