Accessing non-existing hash key using REST

From @biljanaLukovic on Wed May 11 2016 18:42:43 GMT+0000 (UTC)

I have install and configured ipfs version 0.4.0. Happy path works eg. I can put an item into ipfs and retrieve it by produced hash. However, the service does not return when ‘cat’ looks for non existing hash code.
Example with valid hash code:
http://127.0.0.1:5001/api/v0/cat/QmckRHhKxcrp4Y2miz9hpAzFk2fepenrQCT524VYrL9LKY
Any changes in the supplied hash code will cause server to hung.
Attached is my config file.
Thanks
B
config.txt


Copied from original issue: https://github.com/ipfs/faq/issues/120

From @lgierth on Wed May 11 2016 18:50:35 GMT+0000 (UTC)

The daemon doesn’t know that the requested object does not exist. It has no way to know it, and just keeps looking for it in the network.

From @biljanaLukovic on Wed May 11 2016 18:57:44 GMT+0000 (UTC)

Does this mean that web service will not return any response (like status or time out)?
Thanks

From @lgierth on Wed May 11 2016 19:01:18 GMT+0000 (UTC)

It will eventually time out. The public gateway at ipfs.io times out after 30 minutes, I’m not sure what the timeout of the daemon’s gateway itself is – definitely more than 30 minutes though.

Do you want to be able to tell if an object does not exist? You could specify a request timeout with the HTTP/REST library or tool you are using.

From @whyrusleeping on Wed May 11 2016 19:03:28 GMT+0000 (UTC)

You can also add a timeout yourself with the timeout option, for example:
timeout=30s

On Wed, May 11, 2016 at 12:01 PM Lars Gierth notifications@github.com
wrote:

It will eventually time out. The public gateway at ipfs.io times out
after 30 minutes, I’m not sure what the timeout of the daemon’s gateway
itself is – definitely more than 30 minutes though.

Do you want to be able to tell if an object does not exist? You could
specify a request timeout with the HTTP/REST library or tool you are using.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/ipfs/faq/issues/120#issuecomment-218557088

From @biljanaLukovic on Wed May 11 2016 19:13:49 GMT+0000 (UTC)

Thank you lgierth. I set the read timeout on the connection and get immediate response