[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] Ability to follow 302 redirects



I actually just whipped one up in perl, which I will post once I get it in decent shape. If yours is a shell script that uses curl, that might be easier for folks to use, since mine requires a couple of perl modules (LWP::UserAgent, HTTP:Headers) to function. I initially tried a shell script with curl but I couldn't get curl to properly pass the authentication cookie to the redirected URL without doing 2 requests, but I didn't spend much time on it so I was probably doing something wrong :)

-Charles

Ralph Mitchell wrote:
On 6/5/07, Charles Jones <jonescr (at) cisco.com> wrote:
I'm trying to do a content check of a URL that 302's (because an auth
token is being passed in the URL). The problem I am having is Hobbit
reports "No output received from server".

I searched the archives and noted that Hobbit does not (yet?) support
following 302 redirects, but shouldn't it get "something" back from the
server? If anything I could check the 302 code to verify that it is
redirecting to the authenticated URL instead of the error one.

I'm doing this all the time, sucking web pages off our servers to
validate correct operation.  I'm using curl, in custom bash scripts,
to grab pages.  curl is very good at following 302 redirects, going
through proxies with or without authentication, etc.

I've been meaning to post a more-or-less generic script, but haven't
made the time to get it together.  If you're interested, we could work
something out offlist, then post a result either here or maybe on the
Shire.