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

Thanks,
Anil.

7stud -- wrote:
> Anil Kumar wrote:
>> 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

-- 
Posted via http://www.ruby-forum.com/.