Skip to content

New parent POM - #147

Closed
janvanmansum wants to merge 114 commits into
LibraryOfCongress:masterfrom
janvanmansum:new-parent
Closed

New parent POM#147
janvanmansum wants to merge 114 commits into
LibraryOfCongress:masterfrom
janvanmansum:new-parent

Conversation

@janvanmansum

Copy link
Copy Markdown

Please ensure you have completed the following before submitting:

  • Ran all tests to ensure existing functionality wasn't broken
  • Ran all quality assurance checks and fixed any new errors or warnings, which include:

Note: you can complete both boxes by running and fixing warnings/errors with gradle clean check

  • Code is self documenting or a short comment when self documenting isn't possible

jscancella and others added 30 commits July 22, 2018 11:30
…fy all manifests, not just payload manifest
…with bagit-python. Also added tests for valid bags of each standard algorithm
… if file is in at least one manifest when option is enabled
…/bagit-profiles/bagit-profiles)

Inclusion of "Contact-Name," "Contact-Phone" and "Contact-Email," as defined in the BagIt spec, is not required but is encouraged.
-> Add "Contact-Phone"
-> "Contact-Name" and "Contact-Email" are now optional
Add test for minimal profile
Adapt other tests.
Bag-Info:
The parameters "required" is 'false' and "repeatable" is 'true' by default.
Changed implementation accordingly.
("repeatable": Not used yet inside the library!?)
…L_AND_BINTRAY2

Maven Central and bintray config
janvanmansum and others added 29 commits March 13, 2026 12:54
# Description of changes
Several thinks were made configurable about the Hasher, all related to hashing items fetched through the `fetch.txt` file. This only applies when holey bags are allowed.

* Maximum number of redirects, to prevent a redirect-loop.
* Whether to fall back to reading the whole file if chunked download fails even after retries. By default this is now turned off, as typically chunked download is used for very large files and it is unlikely that reading the whole file will succeed if chunks fail.
* The existing options chunksize, maxretries, and retrysleep can now be overridden per call. The default chunksize is now smaller, 128Mb, because chunks are now ready into memory before updating the digest, to prevent corruption if a chunk read fails midway. 1Gb chunks is too large unless you give the JVM a lot of memory, because if the garbage collector cannot keep up you will run out of heap space because of memory fragmentation.

Furthermore the code contained a bug. When a redirect was followed, the subsequent chunks were all downloaded based on the first redirect URL (with the range header updated for the new start and end). This worked fine until the timeout of the authorization expired (e.g. `X-Amz-Date` was more than one hour in the past). We now start with the original URL every time, so that a fresh authorization will be triggered.

The code handling a 200 response after a range request was also improved. A 200 response after the first chunk should mean that the server does not support ranges but instead will send the whole file. The code now checks that the bytes sent are indeed the length of the file. Also, we do not accept a 200 after the first chunk anymore, as this would mean the server changed its mind about supporting ranges.
…ibraryOfCongress#16)

Added optional map of checksum algorithm to fetch items to skip. This is useful when you have externally established that certain fetch item checksum are valid and don't want the library to recalculate them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants