Merge "httputil: allow full error serving when with devcam"

This commit is contained in:
Brad Fitzpatrick 2014-04-23 15:26:30 +00:00 committed by Gerrit Code Review
commit 5ace3bea0f
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import (
"net"
"net/http"
"net/url"
"os"
"path"
"strconv"
"strings"
@ -63,7 +64,7 @@ func RequestEntityTooLargeError(conn http.ResponseWriter) {
func ServeError(conn http.ResponseWriter, req *http.Request, err error) {
conn.WriteHeader(http.StatusInternalServerError)
if IsLocalhost(req) {
if IsLocalhost(req) || os.Getenv("CAMLI_DEV_CAMLI_ROOT") != "" {
fmt.Fprintf(conn, "Server error: %s\n", err)
return
}