Httpclient + server - #8
Merged
Merged
Conversation
Replace the client with nanoframework/System.Net.Http (384a926): its nanoFramework.System.Net.Http, .Client and .Server projects copied as is into src/Cosmos.Network.Http, .Client and .Server. Only the project folder links in the .nfproj and the AssemblyInfo title are renamed.
Cosmos.Network.Http 3.0.0: nanoFramework's HttpClient, HttpWebRequest and HttpListener, with the NetworkStream, SslStream and X.509 parts of its System.Net, on Cosmos's BCL sockets. nano's tree and file names are kept, every port edit carries a "Cosmos:" comment, and one csproj builds it all. - TLS 1.3 and 1.2, client and server, on BouncyCastle driven without blocking (Security/SslNative.cs, in place of nano's native mbedTLS layer), with the certificate check mbedTLS ran (Security/CertificateVerifier.cs) against the Mozilla roots or a given CA. - HttpListener serves every connection on the thread calling GetContext: accepts, advances TLS handshakes, watches kept-alive connections. Stop, Close and Abort from another thread leave the sockets to that one. - No finally, using or lock on a throwing path, no null dereference: a Cosmos kernel skips the first while unwinding and panics on the second. - nano bugs fixed along the way: chunked responses never ended, keep-alive never reused a connection, Host without its port, User-Agent refused, no way to read a response header, truncated bodies taken as complete. Tests: nanoFramework's HttpUnitTests on MSTest (but its own Uri's), plus TLS, certificate, key and HttpClient-HttpListener loopback tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.