Tags: mccutchen/go-httpbin
Tags
feat: add `Server-Timing` headers/trailers where relevant (#186) Here we add [Server-Timing headers/trailers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing) to endpoints that let clients control response timing: - `/delay` (header) - `/drip` (header) - `/sse` (trailer)
feat: /status endpoint supports weighted choice (#162) Fixes compatibility with the original httpbin by making the `/status` endpoint accept multiple, optionally weighted status codes to choose from. Per the description in #145, this implementation attempts to match original httpbin's behavior: - If not specified, weight is 1 - If specified, weights are parsed as floats, but there is no requirement that they sum to 1.0 or are otherwise limited to any particular range Fixes #145.
fix: websocket conns do not require `Connection: upgrade` header (#161) It turns out that the WebSocket API provided by browsers [1] does not actually send the `Connection: upgrade` header that our websocket implementation (wrongly?) requires, so here we're dropping that requirement. [1]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
fix: /base64 endpoint decodes both URL-safe and standard b64 encodings ( #153) As reported in #152, the `/base64` endpoint can only decode the "URL-safe" base64 encoding, but the error it returns is not very useful if you're not already familiar with different base64 encoding variants. Here we follow [Postel's law][1] and accept either the URL-safe or standard encodings, while continuing to use the URL-safe variant when encoding ourselves. Fixes #152. [1]: https://en.wikipedia.org/wiki/Robustness_principle
PreviousNext