in reply to REQUEST_URI from $ENV gets truncated

The validateUser calls the Login form as http://localhost/testdoc_scripts/login?request_uri=...<request-uri-value> . But the REQUEST_URI gets truncated ...

Assuming you mean that <request-uri-value> is actually $ENV{'REQUEST_URI'} (as passed to validateUser()), and that you're passing it as an argument to another CGI, then you need to encode that string for use as a CGI argument. See URI::Escape for how to do that correctly.

  • Comment on Re: REQUEST_URI from $ENV gets truncated

Replies are listed 'Best First'.
•Re: Re: REQUEST_URI from $ENV gets truncated
by merlyn (Sage) on Oct 17, 2002 at 17:11 UTC
    I've never seen any beginner get it right using only URI::Escape. Much better to use URI directly and use the query_form call to do the right semi-escaping. You don't want to escape the ampersands between the fields, for example.

    I've posted examples of using URI with query_form here before.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.