Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
karli2000 opened this Issue · 2 comments

2 participants

@karli2000

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

@SaltwaterC
Owner

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 SaltwaterC referenced this issue from a commit
@SaltwaterC New test for #14. b3ce222
@SaltwaterC SaltwaterC closed this in 28853ca
@karli2000

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