Merged
Conversation
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.
###Security
-Guard against malformed Range header — to!long wrapped in try/catch, returns [-1, -1] on bad input
-environment.toAA() replaced with a whitelist — CGI scripts no longer receive the full server environment
-SSL context race condition fixed — contextsMutex added, all reads/writes to contexts[] now locked
###Performance
-nAlive/nAliveFromIP linear scans replaced with nAlivePerIP[string] rebuilt each loop iteration
-WebConfig now cached per domain — only re-parsed when web.config changes on disk
-needsupdate() double fileSize() syscall reduced to one
-scan() no longer calls needsupdate() before buffer() — eliminates duplicate log output
-rebuffer() now uses byValue — removes repeated AA lookups
###Robustness
-Thread.sleep(2ms) busy-wait replaced with sISelect — clients block on socket read, wake on data
-Server accept loop and client receive timeouts explicitly separated (5ms vs 25ms)
-SocketSet allocation moved to driver field — reused per connection instead of allocated per call
-TOCTOU race in needsupdate/buffer fixed — re-check under lock inside buffer()
-rebuffer() now synchronized
-setPayload sets havepost = true — logically consistent with ready
-buffer() returns bool — callers can check success
###Windows fixes
-/dev/null replaced with platform-aware NUL in process.d unittest
-split(":")[0] crash on empty lines in CGI header parser fixed
-keepalive.d trailing \n removed — fixes Content-Length mismatch on Windows
###Code quality
-Magic OpenSSL numeric constants replaced with named immutable values
-sISelect unified into a single function with write flag and timeout parameter
-findContextLocked dead code removed
-nAlive() simplified to derive from nAlivePerIP.byValue.sum