Giter Site home page Giter Site logo

Comments (6)

mpeterv avatar mpeterv commented on June 3, 2024

Reproduced locally for LuaJIT 2.1.0, again, get the expected file with prefix and suffix, prefix is e8119\r\n and suffix is the same, \r\n0\r\n\r\n. Reproduction done using urllib.urlretrieve, which is what hererocks calls.

from hererocks.

mpeterv avatar mpeterv commented on June 3, 2024

Calling urlretrieve in a loop shows that the first download for each url is broken, the following ones are OK. Perhaps either github or urlretrieve handle chunked encoding incorrectly?..

from hererocks.

mpeterv avatar mpeterv commented on June 3, 2024

Using curl --verbose, indeed, GitHub appears to use Transfer-Encoding: chunked, but only on the first request for each url, with a reset after some delay.

from hererocks.

mpeterv avatar mpeterv commented on June 3, 2024

Of course, the "prefix" is file length in hexadecimal, so the broken file is just full chunk encoded file. Not sure why GitHub decides to send the whole file in one chunk, or why urlretrieve can't handle it,

from hererocks.

mpeterv avatar mpeterv commented on June 3, 2024

OK, so urllib doesn't support chunked transfer (httplib has functions for working with it but they are not used), but urllib2 does, and so does urllib.request from Python 3.

from hererocks.

mpeterv avatar mpeterv commented on June 3, 2024

Fixed in @a9b8ab9.

from hererocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.