Maint: pass only single strings to logger methods
- Do not assume formatting from logger's interface - Allow to change golibs in the future to accept only strings for logger methods
This commit is contained in:
@@ -16,7 +16,7 @@ func (h *handler) isAccepted(responseWriter http.ResponseWriter, request *http.R
|
||||
if !request.ProtoAtLeast(minimalMajorVersion, minimalMinorVersion) ||
|
||||
request.ProtoAtLeast(maximumMajorVersion, maximumMinorVersion) {
|
||||
message := fmt.Sprintf("http version not supported: %s", request.Proto)
|
||||
h.logger.Info("%s, from %s", message, request.RemoteAddr)
|
||||
h.logger.Info(message + ", from " + request.RemoteAddr)
|
||||
http.Error(responseWriter, message, http.StatusBadRequest)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user