Skip to content

Commit

Permalink
fix: do not set SOAPAction header if the value is empty; some APIs re…
Browse files Browse the repository at this point in the history
…ject this header
  • Loading branch information
beldeveloper authored and tiaguinho committed Jul 29, 2022
1 parent 3dabb23 commit 4531510
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion soap.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ func (p *process) doRequest(url string) ([]byte, error) {

req.Header.Add("Content-Type", "text/xml;charset=UTF-8")
req.Header.Add("Accept", "text/xml")
req.Header.Add("SOAPAction", p.SoapAction)
if p.SoapAction != "" {
req.Header.Add("SOAPAction", p.SoapAction)
}

resp, err := p.httpClient().Do(req)
if err != nil {
Expand Down

0 comments on commit 4531510

Please sign in to comment.