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

utf8 BOM is stripped from text files on upload #105

Open
lukasz-karolewski opened this issue Apr 3, 2016 · 3 comments
Open

utf8 BOM is stripped from text files on upload #105

lukasz-karolewski opened this issue Apr 3, 2016 · 3 comments
Labels

Comments

@lukasz-karolewski
Copy link

All files should be transferred as binaries.

i've discovered the problem as I tried to upload an installer. It has a list of files and their sha1 hashes generated during build. My installer was failing with the sha1 hash mismatch error and upon investigation I've confirmed that gulp-awspublish strips BOM from utf8 encoded text files.

@lukasz-karolewski
Copy link
Author

i figured it out, it's actually gulp fault. Gulp depends on an ancient version of vinyl that strips BOM by default.

to fix the issue gulp.src should be replaced with:

var vinyl = require('vinyl-fs');
vinyl.src("files/*/", {stripBOM : false})

and then it will works as expected.

maybe you guys want to add it to readme?

@RichardOtvos
Copy link
Collaborator

RichardOtvos commented May 4, 2016

Thanks for the investigation @kether667 !

I also looked into this and it seems like it won't be fixed in gulp3 (see: gulpjs/gulp#1557), but adding this to the Readme is a good idea!

I will add it and close this story once this is done.

@shadowmint
Copy link

Wow, this bit me as well; after loading a signed application using this plugin it failed validation because the BOM was altered on the upload.

Seriously nasty bug, and very difficult to track down.

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

3 participants