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

TykTechnologies / tyk / 6332 / 2

Build:
DEFAULT BRANCH: master
Ran 09 Mar 2019 11:43AM UTC
Files 108
Run time 7s
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

09 Mar 2019 11:33AM UTC coverage: 62.298% (-0.01%) from 62.309%
LATEST_GO=true

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

Source Files on job 6332.2 (LATEST_GO=true)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5791
  • Travis Job 6332.2
  • 2d8cd054 on github
  • Prev Job for LATEST_GO=true on master (#6331.2)
  • Next Job for LATEST_GO=true on master (#6333.2)
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