Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

large files are corrupted when served through elm-reactor #214

Open
avh4 opened this issue Nov 16, 2016 · 3 comments
Open

large files are corrupted when served through elm-reactor #214

avh4 opened this issue Nov 16, 2016 · 3 comments

Comments

@avh4
Copy link

avh4 commented Nov 16, 2016

This is a SSCCE for #213

With Elm 0.18.0, Mac OS X 10.11.6

Files larger than ~900kb are corrupted by elm-reactor when they are served.

  • Create a file larger than 1MB (you can get a good one with curl -O http://norvig.com/big.txt)
  • start elm-reactor from the folder with the large file
  • download the file through elm-reactor (curl http://localhost:8000/big.txt > downloaded.txt)

If you now compare the downloaded file to the original, (diff -u <(xxd big.txt) <(xxd downloaded.txt)), you will see that around 900,000 characters in, the beginning of the file is repeated.

Additional info:

  • The downloaded file has the same size as the original, but the content differs
  • The file gets corrupted at different locations each time it is downloaded
  • The beginning of the file is actually repeated several times:
    $ grep -n "The Project Gutenberg EBook of The Adventures of Sherlock Holmes" big.txt
    1:The Project Gutenberg EBook of The Adventures of Sherlock Holmes
    
    $ grep -n "The Project Gutenberg EBook of The Adventures of Sherlock Holmes" downloaded.txt
    1:The Project Gutenberg EBook of The Adventures of Sherlock Holmes
    11607:theThe Project Gutenberg EBook of The Adventures of Sherlock Holmes
    17740:Articles"The Project Gutenberg EBook of The Adventures of Sherlock Holmes
    18729:What a time it seemed! From comparing notes afterwards it was but an hour and a quarter, yet it appeared to me that the night must have almost gone, and the dawn be breaking above us. My limbs were weary and stiff, for I feared to change my position; yet my The Project Gutenberg EBook of The Adventures of Sherlock Holmes
    
@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz
Copy link
Contributor

evancz commented Nov 16, 2016

I wonder if this is due to using a newer version of the snap-core Haskell package. I wonder if they have any issues open along these lines, because I basically did not touch the elm-reactor code at all for this release.

@avh4
Copy link
Author

avh4 commented Nov 16, 2016

I took a quick look and didn't see an obviously matching issues on snap-core. If I get a chance, I'll try making a bare-bones project using snap-core and see if it has the same issue so we can report it there.

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

No branches or pull requests

3 participants