The issue was that the code "refetches" if the header is detected to exceed a certain size. BAM code does this as well as there is nothing that tells you upfront that the header is a certain size, so you just keep refetching if the initial request doesn't capture enough data
The amount we fetch is pretty conservative, only 2000 bytes to start, and could be increased perhaps, but this test data helped exercise this code path better.
I tested locally and it fixes https://github.com/GMOD/bbi-js/issues/56
The issue was that the code "refetches" if the header is detected to exceed a certain size. BAM code does this as well as there is nothing that tells you upfront that the header is a certain size, so you just keep refetching if the initial request doesn't capture enough data
The amount we fetch is pretty conservative, only 2000 bytes to start, and could be increased perhaps, but this test data helped exercise this code path better.