loginsrv

Unnamed repository; edit this file 'description' to name the repository.
git clone git@jamesshield.xyz:repos/loginsrv.git
Log | Files | Refs | README | LICENSE

commit 4f2808734c7c326f6d9cf1d9b271d98e73aaeda3
parent 638efbc235f52c31a189043be76a9dd5a8fc1cc5
Author: Gregor Weckbecker <gregor.weckbecker@snabble.io>
Date:   Tue,  5 May 2020 09:31:28 +0200

Merge pull request #131 from motia/master

fix login failure when JSON content type includes charset
Diffstat:
Mlogin/handler.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/login/handler.go b/login/handler.go @@ -419,7 +419,7 @@ func wantJSON(r *http.Request) bool { } func getCredentials(r *http.Request) (string, string, error) { - if r.Header.Get("Content-Type") == contentTypeJSON { + if strings.HasPrefix(r.Header.Get("Content-Type"), contentTypeJSON) { m := map[string]string{} body, err := ioutil.ReadAll(r.Body) if err != nil {