From: Brian Candler Date: 2012-09-07T04:30:33+09:00 Subject: Re: OpenURI open method problem Reza Marvan Spagnolo wrote in post #1074957: > To assert before which way the redirection actually happens, I'd try > with a > browser plugin like Live HTTP Headers or good old Wireshark. > > Marvan Or good old curl. $ curl -v 'http://www.anrdoezrs.net/click-5329913-10569016?url=http%3A%2F%2Fwww.fashion58.com%2Fitemdetail.asp%3Fmod%3DEH5BG213DFSK&cjsku=F58-EH5BG213DFSK' * About to connect() to www.anrdoezrs.net port 80 (#0) * Trying 89.207.18.129... connected * Connected to www.anrdoezrs.net (89.207.18.129) port 80 (#0) > GET /click-5329913-10569016?url=http%3A%2F%2Fwww.fashion58.com%2Fitemdetail.asp%3Fmod%3DEH5BG213DFSK&cjsku=F58-EH5BG213DFSK HTTP/1.1 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 > Host: www.anrdoezrs.net > Accept: */* > < HTTP/1.1 302 Found < Server: Resin/3.1.8 < P3P: policyref="http://www.anrdoezrs.net/w3c/p3p.xml", CP="ALL BUS LEG DSP COR ADM CUR DEV PSA OUR NAV INT" < Cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Pragma: no-cache < Expires: Thu, 06 Sep 2012 19:27:18 GMT < Location: http://www.apmebf.com/sr119hz76P/z5A/ONSTWNOT/SQPWWOQ/N/N/N?w=xdktlv%3DG69-FI6CH324EGTL%26vsm%3Diuuq%254B%253G%253Gxxx.gbtijpo69.dpn%253Gjufnefubjm.btq%254Gnpe%254EFI6CH324EGTL< The URL has moved here * Connection #0 to host www.anrdoezrs.net left intact * Closing connection #0 That's a bog-standard 302 redirect. However, curl -Lv shows that there is a chain of *three* redirects before the final page is reached. -- Posted via http://www.ruby-forum.com/.