Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Calculate OktaClient Content-Length correctly (#300)
Browse files Browse the repository at this point in the history
Fixes: #298
  • Loading branch information
Chippiewill authored Sep 30, 2020
1 parent 98c40a4 commit dbe3493
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ func GetFactorId(f *OktaUserAuthnFactor) (id string, err error) {

func (o *OktaClient) Get(method string, path string, data []byte, recv interface{}, format string) (err error) {
var res *http.Response
var body []byte
var header http.Header
var client http.Client

Expand Down Expand Up @@ -596,7 +595,7 @@ func (o *OktaClient) Get(method string, path string, data []byte, recv interface
ProtoMinor: 1,
Header: header,
Body: ioutil.NopCloser(bytes.NewReader(data)),
ContentLength: int64(len(body)),
ContentLength: int64(len(data)),
}

if res, err = client.Do(req); err != nil {
Expand Down

0 comments on commit dbe3493

Please sign in to comment.