I have the folowing code:

```
response.contentType = "application/octet-stream"
response.setContentLength(templateFile.bytes.length)
response.setHeader("Content-disposition", "attachment;filename=${fileName}")
IOUtils.copy(templateFile,response.outputStream)

```

Where templateFile is Jasper Report template(\*.jrxml). 
And I always get net::ERR\_FILE\_NOT\_FOUND.
For the different file types this code works fine.

Also i tried with content type 'text/xml' but result is the same.