Skip to content

Commit

Permalink
Fix serialization bug in request handling
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
tsandall committed Mar 8, 2018
1 parent 78f0350 commit 46c7ee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: all build

VERSION := 0.2
VERSION := 0.2.1

all: build

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func makeInput(r authorization.Request) (interface{}, error) {

var body interface{}

if r.RequestHeaders["Content-Type"] == "application/json" {
if r.RequestHeaders["Content-Type"] == "application/json" && len(r.RequestBody) > 0 {
if err := json.Unmarshal(r.RequestBody, &body); err != nil {
return nil, err
}
Expand Down

0 comments on commit 46c7ee7

Please sign in to comment.