FriendsOfCake / cakephp-csvview

CakePHP: A view class for generating CSV
MIT License
176 stars 64 forks source link

Safary issue with generated CSV #103

Closed dereuromark closed 4 years ago

dereuromark commented 5 years ago

chrome and FF work nicely, but on safari the content is scrambled somehow:

bplist00Ñ_WebMainResourceÕ    
_WebResourceMIMEType_WebResourceTextEncodingName^WebResourceURL_WebResourceFrameName_WebResourceDataXtext/csvUUTF-8_:https://domain/controller/in-progress.csvPOOn<html><head></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"Issue","Group",Title,"Status",Priority,Link,Created,Modified
[payload]
</pre></body></html>\00\00\00\00(\00>\00\\00k\00‚\00”\00\00£\00à\00á\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00\00\00\00\00\00\00\00\00\00PS

[payload] is the actual rows of data I removed for simplicity

the other browsers also auto trigger download, this one doesnt. Is this a known issue to others?

josegonzalez commented 5 years ago

Thats strange, what happens when you curl the data? We might need to set special headers for safari to not garble it.

dereuromark commented 4 years ago

It wasnt my PC, but a co worker. As such I cant reproduce easily right now. I will close it for the time being until someone can produce more debug info etc.