Skip to content

IPFS http servers do not respond meaningfully to HEAD requests #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BrendanBenshoof opened this issue Feb 28, 2015 · 2 comments
Closed
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) topic/gateway Topic gateway

Comments

@BrendanBenshoof
Copy link

node:5001/ipfs/hash returns code 400 Bad Request for all HEAD requests

node:8080/ipfs/hash returns 405 (arguably correct) for all HEAD requests
node:8080/ipns/hash returns 405 (arguably correct) for all HEAD requests

node:5001/ returns code 404 (correct!)
node:5001/webui returns 302 on my machine
node:5001/webui returns 301 on the travis CI machine
node:5001/webui/ returns 404 (ideally fixed soon in pull #823 )

Ideal behavior is HEAD requests returning corresponding errors as if they were a GET request.

@jbenet
Copy link
Member

jbenet commented Mar 3, 2015

Agreed! Thanks for reporting

@jbenet jbenet added the topic/gateway Topic gateway label Mar 28, 2015
jbenet added a commit that referenced this issue Apr 12, 2015
This commit adds HEAD support to the IPFS Gateway.
Related: #840
@daviddias daviddias added kind/bug A bug in existing code (including security flaws) difficulty: easy labels Jan 2, 2016
@RichardLitt RichardLitt added exp/novice Someone with a little familiarity can pick up and removed difficulty: easy labels Feb 2, 2016
@Kubuxu
Copy link
Member

Kubuxu commented Feb 2, 2016

This was resolved:

$ curl -I localhost:8080/ipns/bin.kubuxu.ovh/
HTTP/1.1 200 OK
Accept-Ranges: bytes
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
Content-Length: 1986
Content-Type: text/html; charset=utf-8
Last-Modified: Tue, 02 Feb 2016 21:18:55 GMT
Suborigin: bin.kubuxu.ovh
X-Ipfs-Path: /ipns/bin.kubuxu.ovh/
Date: Tue, 02 Feb 2016 21:18:55 GMT

$ curl -I localhost:8080/ipns/nonexisting.kubuxu.ovh/
HTTP/1.1 400 Bad Request
Date: Tue, 02 Feb 2016 21:19:03 GMT
Content-Length: 43
Content-Type: text/plain; charset=utf-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) topic/gateway Topic gateway
Projects
None yet
Development

No branches or pull requests

5 participants