hg has asked for the wisdom of the Perl Monks concerning the following question:

I've written a SAX handler to process the xml output of a long-running servlet. The LWP::UserAgent eventually created to handle the request to the servlet has a default timeout of 180 seconds. I can't find a method or option in XML::SAX to set the timeout to another value. Any ideas?

Replies are listed 'Best First'.
•Re: set uri resolver timeout in XML::SAX
by merlyn (Sage) on Nov 05, 2002 at 02:02 UTC
Re: set uri resolver timeout in XML::SAX
by sauoq (Abbot) on Nov 05, 2002 at 02:19 UTC

    That functionality isn't easily available.

    The right way to do it is to write your own ExternEnt and/or ExternEntFin handlers.

    You might give yourself a headstart by using the default handler which you should be able to find as XML/Parser/LWPExternEnt.pl somewhere under your Perl's lib directory. You could probably just copy that file elsewhere, change the call to LWP::UserAgent's constructor, rename the subroutine and set it as your custom handler. Don't hold me to it though.

    Good luck!

    -sauoq
    "My two cents aren't worth a dime.";