Took another look at this, and realized that I didn't take time to make
MyHTTP a proper subclass of Protocol::HTTP. It's really just a hacked up
copy of HTTP.pm

It works, but it is not elegant. I hope some of you find it useful.

Regards,
David

---
David Carter
[EMAIL PROTECTED]


> >-----Original Message-----
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Friday, September 19, 2003 10:50 AM
> >To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >Subject: Re: socket connect and response time
> >
> >See attached MyHTTP.pm implementation &
> >HTTP_response.pl for an (incomplete) example of how to
> >retrieve the response time values it captures.
> >
> >On 19 Sep 2003 06:40:18 -0700, Gisle Aas wrote:
> >
> >>
> >> Simon Wistow <[EMAIL PROTECTED]> writes:
> >>
> >> > Is there an easy way to get the time taken to
> >connect
> >> and the time taken
> >> > to respond to an HTTP request or am I going to have
> >> to go in and hack
> >> > around?
> >>
> >> There is no direct way to do it currently.  You might
> >> be able to just
> >> make your own subclass of LWP::Protocol::http that
> >does
> >> what you want.
> >> You then need to register it as the HTTP handler
> >module
> >> with:
> >>
> >>   LWP::Protocol::implementor('http', 'MyHTTP');
> >>
> >> given that you called your LWP::Protocol::http
> >subclass
> >> MyHTTP.
> >>
> >> Regards,
> >> Gisle


Reply via email to