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

Already on GitHub? Sign in to your account

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

Closed
karli2000 opened this Issue Jan 8, 2013 · 2 comments

Comments

Projects
None yet
2 participants

Hi,

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:
http://t.co/zf2bOPDi
t.co redirects you to this url:
http://www.spex.de/2013/01/06/spex-mixtape-342-bytefm-januar-2013/#bytefmplayer

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,
Max

Owner

SaltwaterC commented Jan 8, 2013

Hello,

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.
-Ștefan

SaltwaterC added a commit that referenced this issue Jan 8, 2013

@SaltwaterC SaltwaterC closed this in 28853ca Jan 8, 2013

WOrks perfect, thank you very much!
Max

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

SaltwaterC added a commit that referenced this issue Jan 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment