This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdk/middleware/sqhttp: transparent http response writer wrapper
Make the HTTP response writer wrapper transparent by implementing the same *known* interfaces as the underlying HTTP response writer. The list of interfaces is currently every optional `net/http` interfaces, and some from `io` when relevant: - `http.Flusher`: to allow flushing any buffered to the client. This enables support for streaming handlers. - `http.Hijacker`: to allow handlers to takeover the HTTP connection. This should enable the support for websocket servers, which are not officially supported by Sqreen, but is now experimentally allowed. - `http.Pusher`: for HTTP2 server push. - `http.CloseNotifier`: the deprecated closed connection notifier. - `io.ReaderFrom`: for optimized copies (eg. `io.Copy(file, w)`) - `io.WriteString`: for optimized string write (which avoids a temporary string copy into a byte slice) The transparent wrapper implementation has been generated with a tool that will be released in the Go agent repository in the future. Fixes #162 and #134
- Loading branch information
Showing
17 changed files
with
1,492 additions
and
200 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.