Mat Kelly

Results 844 comments of Mat Kelly

Related resource https://github.com/FiloSottile/mkcert

Replication: ```python > import ipfsapi > IPFS_API = ipfsapi.Client('localhost', 5001) > IPFS_API.add_bytes('lorem') u'QmeHxdVgh5BVLL7S7AvjrXqum8977XcPcfyHYUkoCG624N' > IPFS_API.add_bytes('') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/site-packages/ipfsapi/utils.py", line 150, in...

This arose in the WARC provided by @james-e-powell as generated by wget, which encountered a 204 No Content when archiving a GitHub status page.

Also reported https://github.com/ipfs/py-ipfs-api/issues/137 but was reminded that py-ipfs-api has deprecated Python 2 usage (I think...the README line about the deprecation is ambiguous).

Sample WARC to replicate this added to `ipwb/samples/warcs/HTTP204.warc` in c9166792c52cf64b4a92e5805fd259c3805121fe.

I performed some manual regression testing on this with the recent release of go-ipfs v0.4.18. Using go-ipfs v0.4.17 via ipfs-update and `ipfs daemon`: ``` $ python3 --version Python 3.7.0 $...

@ibnesayeed I just did via py-ipfs-api: ``` >>> IPFS_API.cat('QmeHxdVgh5BVLL7S7AvjrXqum8977XcPcfyHYUkoCG624N') b'lorem' >>> IPFS_API.cat('QmaRwA91m9Rdfaq9u3FH1fdMVxw1wFPjKL38czkWMxh3KB') [] >>> IPFS_API.cat(b'QmeHxdVgh5BVLL7S7AvjrXqum8977XcPcfyHYUkoCG624N') b'lorem' >>> IPFS_API.cat(b'QmaRwA91m9Rdfaq9u3FH1fdMVxw1wFPjKL38czkWMxh3KB') [] ``` Odd that an empty list is returned for the multihashes...

@ibnesayeed I agree and verified that an empty list will defer to the empty byte string. I _think_ we still have a mix of py2-style strings and explicit byte strings...

@ibnesayeed The above indexing of 0-length payload now returns a hash using ipfs version 0.4.18: ``` >>> IPFS_API.add_bytes('lorem') u'QmeHxdVgh5BVLL7S7AvjrXqum8977XcPcfyHYUkoCG624N' >>> IPFS_API.add_bytes('') u'QmaRwA91m9Rdfaq9u3FH1fdMVxw1wFPjKL38czkWMxh3KB' ``` Should we revert the code within `pushToIPFS()`...

Ok. A sample WARC exhibiting just this ought to be created as well. The ones we have (`redirect.warc` and `redirectRelative.warc`) both have entity bodies. `IAH-20080430204825-00000-blackbook.warc.gz` has some 3XXs with 0-length...