cmd/go/internal/web: include snippets of plain-text server responses in error detail
For the server response to be displayed, the response must be served as type text/plain with charset us-ascii or utf-8, and must consist of only graphic characters and whitespace. We truncate the server response at the first blank line or after 8 lines or a fixed number of characters, and tab-indent (if multiple lines) to ensure that the response is offset from ordinary go command output. Fixes #30748 Change-Id: I0bc1d734737e456e3251aee2252463b6355e8c97 Reviewed-on: https://go-review.googlesource.com/c/go/+/189783 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Showing
Please register or sign in to comment