Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mimetypes #7

Closed
pizzapanther opened this issue Oct 31, 2017 · 8 comments
Closed

Mimetypes #7

pizzapanther opened this issue Oct 31, 2017 · 8 comments
Labels
Milestone

Comments

@pizzapanther
Copy link

CSS gets set to mimetype text/plain instead of text/css which screws up the browser. Is there any way to change this behavior or is this a code issue? I'm guessing this is something coming from libmagic so maybe there is configuration I can do?

@dmfutcher dmfutcher added this to the 0.2.2 milestone Oct 31, 2017
@dmfutcher
Copy link
Owner

Hi @pizzapanther

From https://stackoverflow.com/questions/12494501/libmagic-text-plain-instead-of-text-javascript-text-css it looks like libmagic can't work CSS & JS out from plain text. So I could manually set them based on extension, or just use the built-in Golang mime types like on Windows. I genuinely can't remember why I used magicmime over the Golang built-in so I might start with that and see what (if anything) breaks.

@dmfutcher dmfutcher added the bug label Oct 31, 2017
@pizzapanther
Copy link
Author

Let me know when it's in and I'll test. I haven't used the Go builtin mimes but the Python built in mimetypes have never failed me.

@dmfutcher
Copy link
Owner

@pizzapanther, I've replaced magicmime with standard Golang mime package on master. Please let me know if this is working as you expect

@dmfutcher
Copy link
Owner

@pizzapanther have you had a chance to test this out?

@pizzapanther
Copy link
Author

I did but I don't think I was building it correctly. Can you package up a new binary so I can just test it that way?

@dmfutcher
Copy link
Owner

No worries, uploaded release candidate 2 here: https://github.com/bobbo/git-s3-push/releases/tag/0.2.1

Thanks for the help testing this out

@pizzapanther
Copy link
Author

Looks good http://nimb.ws/ilpJC2

And you even get the UTF-8 charset added too.

@dmfutcher
Copy link
Owner

Fixed in v0.2.1: https://github.com/bobbo/git-s3-push/releases/tag/0.2.1

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants