List Info

Thread: Re: + in GET param




Re: + in GET param
user name
2007-09-12 05:07:31
Tatsuhiko Miyagawa wrote:
> I tested but couldn't reproduce. So I wouldn't say this
is a Cat bug.
> 
> % catalyst.pl TestApp
> % cd TestApp
> % vi lib/TestApp/Controller/Root.pm
> 
> sub default : Private {
>     my ( $self, $c ) = _;
> 
>     # Hello World
>     $c->response->body("Hello " .
($c->req->param('username') ||
"(default)"));
> }
> 
> % ./script/testapp_server.pl
> 
> Access http://localhost:3000/?username=first.last%2Bme%40gma
il.com
> 
> It prints out "Hello first.last+megmail.com".
> 
> [info] *** Request 1 (0.167/s) [1194] [Tue Sep 11
19:54:11 2007] ***
> [debug] Query Parameters are:
>
.-------------------------------------+---------------------
-----------------.
> | Parameter                           | Value          
                     |
>
+-------------------------------------+---------------------
-----------------+
> | username                            |
first.last+megmail.com              |
>
'-------------------------------------+---------------------
-----------------'
> [debug] "GET" request for "/" from
"192.168.70.1"
> [info] Request took 0.068512s (14.596/s)
>
.-----------------------------------------------------------
-----+-----------.
> | Action                                               
         | Time      |
>
+-----------------------------------------------------------
-----+-----------+
> | /default                                             
         | 0.000100s |
> | /end                                                 
         | 0.000818s |
>
'-----------------------------------------------------------
-----+-----------'
> 
> Check Catalyst::Engine versions or whatever plugins you
use that
> messes something with request parameters?
> 
> 

Very strange.

I've just put this in Root.pm

 85 sub param : Local {
 86     my ( $self, $c ) = _;
 87
 88     # Hello World
 89     $c->response->body(
 90         "Hello " . (
$c->req->param('username') || "(default)" )
);
 91 }

and gone to:

http://suretec:3000/param/?username=first.last%2B
me%40gmail.com

And the same result as before:

Hello first.last megmail.com

[info] FTM powered by Catalyst 5.7010
You can connect to your server at http://suretec:3000
[info] *** Request 1 (0.143/s) [5885] [Wed Sep 12 11:05:15
2007] ***
[debug] Query Parameters are:
.---------------------------------+-------------------------
-----.
| Parameter                           | Value               
    |
+---------------------------------+-------------------------
-----+
| username                            | first.last megmail.com
 |
'---------------------------------+-------------------------
-----'
[debug] "GET" request for "param/" from
"127.0.0.1"
[debug] Path is "param"
[info] Request took 0.091166s (10.969/s)
.----------------------------------------------------+------
-----.
| Action                                             | Time 
    |
+----------------------------------------------------+------
-----+
| /begin                                             |
0.000203s |
| /param                                             |
0.000136s |
| /end                                               |
0.000285s |
'----------------------------------------------------+------
-----'



_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

Re: + in GET param
country flaguser name
United States
2007-09-12 05:17:05
Gavin Henry wrote:
> Tatsuhiko Miyagawa wrote:
>   
>> I tested but couldn't reproduce. So I wouldn't say
this is a Cat bug.
> And the same result as before:
>
> Hello first.last megmail.com
>   

Would you guys be so kind as to run scandeps.pl (from
Module::ScanDeps
on CPAN) and report the versions of everything along the
prereq chain?

FWIW, I have the same results as miyagawa and my versions
look like:

$ scandeps.pl -x script/testapp_test.pl

'CGI::Simple::Cookie'               => '1.103',
'CGI::Simple::Util'                 => '1.103',
'Catalyst'                          => '5.7010',
'Catalyst::Action'                  => 'undef',
'Catalyst::ActionContainer'         => 'undef',
'Catalyst::AttrContainer'           => 'undef',
'Catalyst::Component'               => 'undef',
'Catalyst::Controller'              => 'undef',
'Catalyst:evel'   
               => '1.03',
'Catalyst:ispatchT
ype'            => 'undef',
'Catalyst:ispatchT
ype:efault' 
 => 'undef',
'Catalyst:ispatchT
ype::Index'     => 'undef',
'Catalyst:ispatchT
ype::Path'      => 'undef',
'Catalyst:ispatchT
ype::Regex'     => 'undef',
'Catalyst:ispatche
r'              => 'undef',
'Catalyst::Engine'                  => 'undef',
'Catalyst::Engine::CGI'             => 'undef',
'Catalyst::Log'                     => 'undef',
'Catalyst::Request'                 => 'undef',
'Catalyst::Request::Upload'         => 'undef',
'Catalyst::Response'                => 'undef',
'Class:ata::Inh
eritable'          => '0.06',
'Data:ump'    
                   => '1.08',
'Devel::InnerPackage'               => '0.3',
'File::Copy'                        => '2.09',
'File::Find'                        => '1.10',
'File::Spec::Functions'             => '1.3',
'File::Temp'                        => '0.18',
'HTTP::Body'                        => '0.9',
'HTTP::Body::MultiPart'             => 'undef',
'HTTP::Body::OctetStream'           => 'undef',
'HTTP::Body::UrlEncoded'            => 'undef',
'Module::Pluggable::Object'         => '3.6',
'NEXT'                              => '0.60',
'SelfLoader'                        => '1.0904',
'TestApp'                           => 'undef',
'TestApp::Controller::Root'         => 'undef',
'Text::Balanced'                    => '2.0.0',
'Text::SimpleTable'                 => '0.03',
'Time::HiRes'                       => '1.9707',
'Tree::Simple'                      => '1.17',
'Tree::Simple::Visitor'             => '1.11',
'Tree::Simple::Visitor::FindByPath' => '0.03',
'Tree::Simple::Visitor::FindByUID'  => '0.02',
'URI::QueryParam'                   => 'undef',
'lib'                               => '0.5565',
'version'                           => '0.7203',
'version::vxs'                      => '0.7203',
'Apache::Connection'                => '1.00',
'Apache::Constants'                 => '1.09',
'Apache::Server'                    => '1.01',
'Apache::Table'                     => '0.01',
'mod_perl'                          => '1.29',
'Apache::Constants::Exports'        => 'undef',
'Digest::HMAC_MD5'                  => '1.01',
'GSSAPI'                            => '0.24',
'GSSAPI::Status'                    => 'undef',
'Apache'                            => '1.27',
'Catalyst::Utils'                   => 'undef',
'HTTP::Request::AsCGI'              => '0.5',
'Catalyst::Exception'               => 'undef',
'Class::Inspector'                  => '1.17',
'URI'                               => '1.35',
'LWP::UserAgent'                    => '2.036',
'LWP::Protocol::http10'             => 'undef',
'URI::URL'                          => '5.03',
'LWP::Authen::Basic'                => 'undef',
'LWP::Authen:igest'  
            => 'undef',
'LWP::Authen::Ntlm'                 => '0.05',
'LWP::Authen::Wsse'                 => '0.05',
'LWP::Protocol::GHTTP'              => 'undef',
'LWP::Protocol::cpan'               => 'undef',
'LWP::Protocol::data'               => 'undef',
'LWP::Protocol::file'               => 'undef',
'LWP::Protocol::ftp'                => 'undef',
'LWP::Protocol::gopher'             => 'undef',
'LWP::Protocol::https'              => 'undef',
'LWP::Protocol::https10'            => 'undef',
'LWP::Protocol::ldap'               => '1.10',
'LWP::Protocol::loopback'           => 'undef',
'LWP::Protocol::mailto'             => 'undef',
'LWP::Protocol::nntp'               => 'undef',
'LWP::Protocol::nogo'               => 'undef',
'LWP::Protocol::http'               => 'undef',
'URI::http'                         => 'undef',
'URI::ftp'                          => 'undef',
'URI::gopher'                       => 'undef',
'URI::https'                        => 'undef',
'URI::ldapi'                        => 'undef',
'URI::ldaps'                        => 'undef',
'URI::mms'                          => 'undef',
'URI::nntp'                         => 'undef',
'URI::pop'                          => 'undef',
'URI::rlogin'                       => 'undef',
'URI::rsync'                        => 'undef',
'URI::rtspu'                        => 'undef',
'URI::sips'                         => 'undef',
'URI::snews'                        => 'undef',
'URI::ssh'                          => 'undef',
'URI::telnet'                       => 'undef',
'URI::tn3270'                       => 'undef',
'URI::urn::isbn'                    => 'undef',
'URI::urn::oid'                     => 'undef',
'URI::ldap'                         => '1.11',
'URI::rtsp'                         => 'undef',
'URI::urn'                          => 'undef',
'URI::mailto'                       => 'undef',
'URI::data'                         => 'undef',
'URI::news'                         => 'undef',
'URI::file'                         => '4.19',
'URI::sip'                          => '0.10',
'Path::Class'                       => '0.16_01',
'Class::Accessor'                   => '0.31',
'IO::Compress::Gzip'                => '2.005',
'IO::Uncompress::Gunzip'            => '2.005',
'IO::Compress::Base::Common'        => '2.005',
'Compress::Raw::Zlib'               => '2.005',
'IO::Compress::Gzip::Constants'     => '2.005',
'Convert::ASN1::IO'                 => 'undef',
'Convert::ASN1::_decode'            => 'undef',
'Convert::ASN1::_encode'            => 'undef',
'Convert::ASN1::parser'             => 'undef',
'Crypt::SSLeay::X509'               => 'undef',
'Crypt::SSLeay::CTX'                => 'undef',
'Digest::HMAC'                      => '1.01',
'Digest::base'                      => '1.00',
'File::Spec::Unix'                  => '1.5',
'File::Spec'                        => '3.24',
'Cwd'                               => '3.24',
'HTML::Parser'                      => '3.56',
'HTTP::Cookies::Netscape'           => '1.26',
'Time::Zone'                        => '2.22',
'Compress::Bzip2'                   => '2.09',
'Compress::Zlib'                    => '2.005',
'Class::Accessor::Fast'             => '0.31',
'IO::File'                          => '1.14',
'IO::Handle'                        => '1.27',
'HTTP::Message'                     => '1.57',
'File::GlobMapper'                  => '0.000_02',
'IO::Compress::Base'                => '2.005',
'IO::Compress::RawDeflate'          => '2.005',
'IO::Compress::Adapter:eflate' 
  => '2.005',
'IO'                                => '1.23',
'IO::Pipe'                          => '1.13',
'IO::Seekable'                      => '1.10',
'IO:ir'     
                     => '1.06',
'Errno'                             => '1.10',
'Net::SSLeay'                       => '1.30',
'IO::Uncompress::RawInflate'        => '2.005',
'IO::Compress::Zlib::Extra'         => '2.005',
'IO::Uncompress::Adapter::Inflate'  => '2.005',
'IO::Uncompress::Base'              => '2.005',
'Digest::SHA1'                      => '2.11',
'HTML::HeadParser'                  => '2.22',
'HTML::Entities'                    => '1.35',
'File::Listing'                     => '1.15',
'IO::Socket'                        => '1.30',
'IO::Socket::UNIX'                  => '1.23',
'IO::Socket::INET'                  => '1.31',
'IO::Select'                        => '1.17',
'Net::HTTP'                         => '1.00',
'Net::HTTPS'                        => '1.00',
'Net::SSL'                          => '2.81',
'IO::Socket::SSL'                   => '1.08',
'HTTP::Negotiate'                   => '1.16',
'LWP::MediaTypes'                   => '1.33',
'Net::LDAP'                         => '0.34',
'Mail::Internet'                    => '1.77',
'HTTP::Request'                     => '1.40',
'HTTP::Response'                    => '1.53',
'LWP::Protocol'                     => '1.46',
'HTTP::Status'                      => '1.28',
'LWP:ebug'   
                    => 'undef',
'HTTP::Request::Common'             => '1.28',
'LWP::ConnCache'                    => '0.01',
'HTTP::Cookies'                     => '1.39',
'HTTP::Headers::Util'               => '1.13',
'HTTP::Headers'                     => '1.64',
'LWP::MemberMixin'                  => 'undef',
'LWP'                               => '5.808',
'HTTP:ate'    
                   => '1.47',
'Mail::Header'                      => '1.77',
'Net::HTTP::Methods'                => '1.02',
'Net::LDAP::Bind'                   => '1.02',
'Net::LDAP::Extension'              => '1.01',
'Net::LDAP::RootDSE'                => '0.01',
'Net::LDAP::Schema'                 => '0.9905',
'Net::LDAP::Search'                 => '0.11',
'Convert::ASN1:ebug'   
          => 'undef',
'Convert::ASN1'                     => '0.21',
'Net::LDAP::Message'                => '1.09',
'Net::LDAP::ASN'                    => '0.04',
'Net::LDAP::Constant'               => '0.04',
'Net::LDAP::Filter'                 => '0.15',
'Net::LDAP::Entry'                  => '0.23',
'Net::LDAP::Control'                => '0.06',
'Net::LDAP::Util'                   => '0.11',
'Net::LDAP::LDIF'                   => '0.17',
'Authen::SASL::EXTERNAL'            => '0.99',
'Authen::SASL::CRAM_MD5'            => '0.99',
'Authen::SASL'                      => '2.10',
'Authen::SASL::Perl'                => '1.05',
'Authen::SASL::Perl::ANONYMOUS'     => '1.03',
'Authen::SASL::Perl::CRAM_MD5'      => '1.03',
'Authen::SASL::Perl:IGEST_MD
5'    => '1.05',
'Authen::SASL::Perl::EXTERNAL'      => '1.03',
'Authen::SASL::Perl::GSSAPI'        => '0.02',
'Authen::SASL::Perl::LOGIN'         => '1.03',
'Authen::SASL::Perl::PLAIN'         => '1.04',
'Crypt::SSLeay::Conn'               => 'undef',
'Crypt::SSLeay::Err'                => 'undef',
'Crypt::SSLeay::MainContext'        => 'undef',
'Crypt::SSLeay'                     => '0.56',
'Path::Class::File'                 => 'undef',
'Path::Class:ir'     
            => 'undef',
'Path::Class::Entity'               => 'undef',
'URI::_foreign'                     => 'undef',
'URI::_generic'                     => 'undef',
'URI::WithBase'                     => '2.19',
'URI::Escape'                       => '3.28',
'URI::_segment'                     => 'undef',
'URI::_userpass'                    => 'undef',
'URI::_server'                      => 'undef',
'URI::_ldap'                        => '1.10',
'URI::_query'                       => 'undef',
'URI::_login'                       => 'undef',
'Mail::Util'                        => '1.77',
'Mail::Mailer'                      => '1.77',
'Mail::Address'                     => '1.77',
'Catalyst::Test'                    => 'undef',

Regards,
Jonathan Rockway


_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )