mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
swarm/api/http: sticky footer for error pages and fix for multiple choices
This commit is contained in:
parent
e0450b9b4d
commit
c9b3f9e675
2 changed files with 73 additions and 67 deletions
|
|
@ -147,6 +147,14 @@ func Respond(w http.ResponseWriter, req *Request, msg string, code int) {
|
|||
switch code {
|
||||
case http.StatusInternalServerError:
|
||||
log.Output(msg, log.LvlError, l.CallDepth, "ruid", req.ruid, "code", code)
|
||||
case http.StatusMultipleChoices:
|
||||
log.Output(msg, log.LvlDebug, l.CallDepth, "ruid", req.ruid, "code", code)
|
||||
listURI := api.URI{
|
||||
Scheme: "bzz-list",
|
||||
Addr: req.uri.Addr,
|
||||
Path: req.uri.Path,
|
||||
}
|
||||
additionalMessage = fmt.Sprintf(`<a href="/%s">multiple choices</a>`, listURI.String())
|
||||
default:
|
||||
log.Output(msg, log.LvlDebug, l.CallDepth, "ruid", req.ruid, "code", code)
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue