jakubgarfield / Bonobo-Git-Server

Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
http://bonobogitserver.com
MIT License
1.81k stars 603 forks source link

Browsing to a binary file tries to display as text in the blob preview #714

Closed Nu11u5 closed 7 years ago

Nu11u5 commented 7 years ago

If you include a binary file in your repo and browse to it in Bonobo the server will try to parse and return the entire file contents as text in the preview.

willdean commented 7 years ago

I think it's a little more complex than that - there are a bunch of rules for trying to display binaries as something else (e.g. images), though I don't know much about that. What sort of file was it?

Nu11u5 commented 7 years ago

It's a Windows executable I'm including as a tool. 'MZ' magic number, etc.

willdean commented 7 years ago

@Nu11u5 - the logic for deciding whether or not to display files as 'text' has been broken - I will merge a fix for this shortly - thanks for letting us know.