• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 6332

Build:
DEFAULT BRANCH: master
Ran 09 Mar 2019 11:43AM UTC
Jobs 1
Files 108
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
6332

push

travis-ci

buger
res_handler_transform: make sure bodyData is available on XML errors (#2133)

For #2016.

I was able to reproduce using the instructions described in the ticket. The issue occurs at this point:

```go
	bodyData := make(map[string]interface{})
	switch tmeta.TemplateData.Input {
	case apidef.RequestXML:
		if len(body) == 0 {
			body = []byte("<_/>")
		}

		mxj.XmlCharsetReader = WrappedCharsetReader
		var err error

		bodyData, err := mxj.NewMapXml(body)
		if err != nil {
			logger.WithError(err).Error("Error unmarshalling XML")
		}
```

When `mxj.NewMapXml` returns an error, `bodyData` is not properly set and further references to it fail (like setting context vars using `bodyData["_tyk_context"] = ctxGetData(req)`).

This approach avoids replacing `bodyData`.

10509 of 16869 relevant lines covered (62.3%)

0.69 hits per line

Jobs
ID Job ID Ran Files Coverage
2 6332.2 (LATEST_GO=true) 09 Mar 2019 11:43AM UTC 0
62.3
Travis Job 6332.2
Source Files on build 6332
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #6332
  • 2d8cd054 on github
  • Prev Build on master (#6331)
  • Next Build on master (#6333)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc