Skip to content

Commit

Permalink
address pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed May 11, 2023
1 parent 238c351 commit 2e4a7e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions x-pack/filebeat/input/httpjson/encoding.go
Expand Up @@ -226,11 +226,11 @@ func decodeAsZip(p []byte, dst *response) error {
}

func decodeAsXML(p []byte, dst *response) error {
cdata, v, err := xml.Unmarshal(bytes.NewReader(p), dst.xmlDetails)
cdata, body, err := xml.Unmarshal(bytes.NewReader(p), dst.xmlDetails)
if err != nil {
return err
}
dst.body = v
dst.body = body
dst.header["XML-CDATA"] = []string{cdata}
return nil
}
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/httpjson/input.go
Expand Up @@ -134,7 +134,7 @@ func run(
if config.Response.XSD != "" {
xmlDetails, err = xml.Details([]byte(config.Response.XSD))
if err != nil {
log.Errorf("Error while creating requestFactory: %v", err)
log.Errorf("error while collecting xml decoder type hints: %v", err)
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/httpjson/request.go
Expand Up @@ -133,7 +133,7 @@ func newRequestFactory(ctx context.Context, config config, log *logp.Logger) ([]
var err error
xmlDetails, err = xml.Details([]byte(config.Response.XSD))
if err != nil {
log.Errorf("Error while creating requestFactory: %v", err)
log.Errorf("error while collecting xml decoder type hints: %v", err)
return nil, err
}
}
Expand Down

0 comments on commit 2e4a7e6

Please sign in to comment.