Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Wrong result when following a redirect to a url with a # in the address #14

karli2000 opened this Issue · 2 comments

2 participants



first of all: thank you for http-get, by far the best working lib for making http-requests in nodejs!

I just found one issue: try to get this url using http-get: redirects you to this url:

and with http-get i get an 404 error because the stuff after the # is send to the server too, which should not be the issue, so http-get should report under result.url this url and should remove the part after the # when it tries to get the data.

Thank you,



You're welcome! Did it to scratch my own itch, but is far from complete, or even bug free (duh). I think Mikeal's request does a really good job, but it doesn't fit my specific needs (whatever that means), while the rest of my projects don't use a distinct HTTP module (except the stuff from node's core lib). I may go over GET / HEAD and finally rename it to something like http-request, but usually I suck at predictions so I won't make any.

About the issue itself, you're right. Unfortunately, although the statements from the README are true, I didn't really encounter the issue due to the fact that I use it for mirroring stuff and downloading a lot of XML junk. Stuff that doesn't care about fragments. The agent should not send the URL fragment, but the laziness from my part kept me from finishing the 3986 reading. Not a big fan of the IETF rocket scientists.

I'll patch it ASAP. Which should make it the third http-get release for today. Pretty much sums up the fact that the project is far from dead.

Thanks for the ping.

@SaltwaterC SaltwaterC referenced this issue from a commit
@SaltwaterC New test for #14. b3ce222
@SaltwaterC SaltwaterC closed this in 28853ca

WOrks perfect, thank you very much!

PS: Mikeal's request is good, but i am tryiing to unshorten urls and there request has a lot of problems.

@SaltwaterC SaltwaterC referenced this issue from a commit
@SaltwaterC v0.5.5. Closes #14. 38a27d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.