Francis Turner wrote:
> I'm writing a CGI script that needs to do one thing if the UA is my
> perl script and something else if its not. Since the perlscript just
> needs to "get" the value I was planinng on using LWP::Simple and
> checking the UA string in my CGI script.
>
> The simplest check is to see if the UA is right so I need to know:
> Are there any plans on changing the LWP::Simple user agent name from
> its current lwp-trivial/?.?? format?

Hi Francis.

Well the answer is that I doubt if the

    User-Agent: lwp-trivial/

part of the header will change, but since there's no documentation
to confirm that it is fixed you shouldn't really rely on it. Besides,
what will happen if you find you want something more than the
LWP::Simple functionality?

How about using a query on the URL you're requesting:

    http://www.domain.net/path/resource.dat?myperl=1

which will add a parameter to your CGI script which you
can test for.

HTH,

Rob



Reply via email to