Re: using the xhtml validator on pages requiring login that pass cook ies to you

On Thu, 2003-07-17 at 23:09, Fred Guanzon wrote:

> Is there a way to use the xhtml validator on pages that require login and
> that pass cookies to you for your personal settings? If I try to use the
> validator on a site like that I usually get an error because I am redirected
> to the site's login page, even if I have already logged into the page and
> had its cookie passed to me. When I run the validator it seems to run like a
> new user to the site, who does not have cookies or a login.

That's because your browser won't send the cookies it has received from
host/domain X to host/domain Y (eg. validator.w3.org).  So, validator
neves sees your cookie and so cannot pass it on.

> Is there a way
> to hack the check.cgi file in order to have it pass a login and password to
> the site I want to validate and then grab and then pass back the cookie that
> the site is passing to me.

I don't see why it wouldn't be /possible/.  But it also sounds like an
ugly hack to me...

>  I was thinking of using lwp, but I want to know
> if anyone has done this successfully and how did they do it using lwp or any
> other method?

LWP is fine.  Validator is based on it.

Note that there's another option; you could have your browser POST the
already retrieved document to validator.  IIRC eg. Opera does that.

Or using HTTP::Cookies(::Netscape, was there a MSIE implementation?) you
could get Validator to use the cookies from your browser, without the
login ugliness.

-- 
\/

Received on Friday, 18 July 2003 02:29:36 UTC