mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
gofmt
This commit is contained in:
parent
ce09f5593d
commit
016d464043
2 changed files with 6 additions and 6 deletions
|
|
@ -396,4 +396,4 @@ const AuthorizationHTML = `
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
`
|
`
|
||||||
|
|
|
||||||
10
rpc/http.go
10
rpc/http.go
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/embed"
|
"github.com/ethereum/go-ethereum/embed"
|
||||||
|
|
||||||
"github.com/rs/cors"
|
"github.com/rs/cors"
|
||||||
|
|
@ -106,15 +106,15 @@ func (t *httpReadWriteNopCloser) Close() error {
|
||||||
// send the request to the given API provider and sends the response back to the caller.
|
// send the request to the given API provider and sends the response back to the caller.
|
||||||
func newJSONHTTPHandler(srv *Server) http.HandlerFunc {
|
func newJSONHTTPHandler(srv *Server) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
if r.URL.Path == "/authorization.html"{
|
if r.URL.Path == "/authorization.html" {
|
||||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
if _, err := w.Write([]byte(embed.AuthorizationHTML)); err != nil {
|
if _, err := w.Write([]byte(embed.AuthorizationHTML)); err != nil {
|
||||||
fmt.Fprintf(w, "%s", err)
|
fmt.Fprintf(w, "%s", err)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.ContentLength > maxHTTPRequestContentLength {
|
if r.ContentLength > maxHTTPRequestContentLength {
|
||||||
http.Error(w,
|
http.Error(w,
|
||||||
fmt.Sprintf("content length too large (%d>%d)", r.ContentLength, maxHTTPRequestContentLength),
|
fmt.Sprintf("content length too large (%d>%d)", r.ContentLength, maxHTTPRequestContentLength),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue