Closed GoogleCodeExporter closed 8 years ago
Thank you for the report. I have corrected all snippets on code.google.com (the
changes should go live shortly) and filed a bug to get the updated archive
posted shortly.
Original comment by jasonaco...@google.com
on 27 Aug 2010 at 1:07
There is another inconsistency / bug with regard to the query string handling.
In Perl, you have this line:
my $query = $ENV{'QUERY_STRING'};
However, this is dead code. The $query value is not used after this. It looks
like Java code may have the correct behavior here, since it later makes use of
the value:
if (query != null) {
path += "?" + query;
}
The Perl code has another bug as well in that it emits warning under "use
warnings" which is a best practice to have turned on. Logs will soon fill up
with warnings like this when one of the 3 environment variables is not defined:
Use of uninitialized value in concatenation (.) or string at
You could add "no warnings;" to the subroutine, if you are OK with what happens
when the values are undefined. Otherwise, updates will need to made to explicit
avoid using undefined values.
A more strict port of the Java code should do the trick. I see that it is
littered with " Value != null ". In Perl you would say " defined $Value ".
Mark
Original comment by m...@summersault.com
on 6 May 2011 at 6:41
Another thing: In the Java version you UTF-8 encode data before URI-encoding
it. In Perl you do not. To do so in Perl you could use uri_escape_utf8()
instead of uri_escape().
Original comment by m...@summersault.com
on 6 May 2011 at 6:50
Original comment by eleichte...@google.com
on 28 Sep 2011 at 5:05
Original issue reported on code.google.com by
e28...@gmail.com
on 17 Aug 2010 at 2:05