Getting final URL during HTTP redirection

D

Daniel Otero

I need URL resolution for some software I'm working on. Better put, I
want to figure out the final URL at which you land when requesting some
initial URL. I have no interest in the page data itself.

Properly handling redirects robustly is difficult due to the horrific
tendency of many developers and servers to improperly handle them. You'd
expect a Location header, but I've run into several other possible
responses ranging from Redirect headers to html meta tags.

Is there some library out there that will make my job easier, or will I
have to roll my own. Keep in mind I want the URL that was last
requested, not the response from that request.

Thanks!
 
M

Michael J. I. Jackson

What makes this problem even more difficult is that redirects could
happen on the client side. It's something that I've been looking into
a lot lately, but no luck yet. I'd be very interested if anybody knows
of a good solution that could handle this as well.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top