Redirected URL

A

Anil Kumar

Hi,
I was trying to parse a web page where multiple hyper links exist.
Each hyper link redirecting to a different server. I just want store
first server it is redirecting the request too.

I tried using 'net/http' to capture 'Location' from response. But not
working. Showing 'Location' value as blank.

Please help.
Thanks,
Anil.
 
7

7stud --

Anil said:
Hi,
I was trying to parse a web page where multiple hyper links exist.
Each hyper link redirecting to a different server. I just want store
first server it is redirecting the request too.

I tried using 'net/http' to capture 'Location' from response. But not
working. Showing 'Location' value as blank.

Do you know the difference between:

1) parsing a web page and retrieving the first link's href

and

2) examining a response's Location header

http://en.wikipedia.org/wiki/URL_redirection
 
A

Anil Kumar

Thanks for you reply. I know the difference. I resolved this issue by
sending 'User-Agent' value in header.

Thanks,
Anil.
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top