Giter Site home page Giter Site logo

Comments (3)

JustAnotherArchivist avatar JustAnotherArchivist commented on May 26, 2024

Side note: NO_BLOCK_DIGEST_TYPES is actually a string, not a tuple as certainly intended. That won't have any negative effect though unless someone is writing custom records with a WARC-Type that is a substring of warcinfo.

from warcio.

wumpus avatar wumpus commented on May 26, 2024

The ('warcinfo') aspect of the bug is old. It was (accidentally) introduced in

25194bc
warcwriter: if writing a record with no Content-Length, buffer and compute length, as well as digests, as needed

You're right that any recordtype that's a subset of the string 'warcinfo' will match, fortunately there is no such standard recordtype.

As for that explicit code that stops writing block digests for warcinfo records, that code was in the original checkin, when the code was split out of webrecorder. I'm kind of surprised that I didn't notice it while working on "warcio test".

from warcio.

JustAnotherArchivist avatar JustAnotherArchivist commented on May 26, 2024

I dug around a bit more. a791617 is not the commit that introduced this behaviour. It appears that it was already like that back when warcinfo records were first added in webrecorder/pywb@d40edfc2; at the time, digests were only written for responses as far as I can tell.

I can't really think of any good reason why block digests shouldn't simply always be present for verification purposes. The only exception would be zero-length records, where the digest is useless, but those are so rare and odd that worrying about them isn't worth it. I'll create a PR shortly.

from warcio.

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.