CGI-PSGI

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.14  Sat Dec 25 11:35:52 PST 2010
        - Port fixes for header injection from CGI.pm (markstos)

0.13  Sat Oct 30 23:09:06 PDT 2010
        - Specify Test::More dep

0.12  Mon Oct 25 11:06:59 PDT 2010
        - Strip Status: header since to conform PSGI spec (clkao)

0.11  Sat May  1 04:37:07 PDT 2010
        - Upped CGI.pm dependency to 3.33 to fix the upload() issue in perl 5.10

0.10  Wed Mar 31 01:14:43 PDT 2010
        - Upped CGI.pm dependency to 3.15, released in 2005 and is core in perl 5.8.8

0.09  Thu Feb 11 14:47:26 PST 2010
        - Added ->psgi_redirect to make migration from CGI.pm even easier (markstos)
        - POD overhaul and improvements (markstos)

0.07  Tue Jan 12 10:21:19 PST 2010
        - Unset $CGI::MOD_PERL in case CGI.pm is preloaded by other non-PSGI apps running on Apache
          (confound, sukria)

0.06  Wed Jan  6 18:12:45 PST 2010
        - Added ->env method to access PSGI env from the object.

0.05  Wed Jan  6 00:37:23 PST 2010
        - Fixed a bug where uploaded files are not saved in temp files (fujiwara)

0.04  Wed Dec  9 16:37:47 PST 2009
        - Added virtual_host to the list because bad CGI.pm uses host() as a function not a method (kazuho)

0.03  Fri Nov 27 17:32:50 JST 2009
        - Speicify CGI.pm dependency since older one has different read_from_client params

0.02  Mon Oct 19 20:16:25 PDT 2009
        - Fix the test to skip if <= 3.45 not < 3.45

MANIFEST  view on Meta::CPAN

Makefile.PL
MANIFEST			This list of files
META.yml
README
t/00_compile.t
t/cookie.t
t/http.t
t/psgi.t
t/psgi_headers.t
t/redirect.t
t/upload.t
tools/extract-methods
xt/perlcritic.t
xt/pod.t
xt/podspell.t
xt/synopsis.t

t/upload.t  view on Meta::CPAN

    'CONTENT_TYPE'    => 'multipart/form-data; boundary=----BOUNDARY',
    'REQUEST_METHOD'  => 'POST',
    'SERVER_PROTOCOL' => 'HTTP/1.0',
    'psgi.input'      => $input,
};

{
    my $q = CGI::PSGI->new($env);
    is $q->param("bar"), "BAR";

    my $fh = $q->upload("upload_foo");
    is     $fh, "foo.txt";
    isa_ok $fh, "Fh";

    my $body = do { local $/; <$fh> };
    is $body, "FOO";
}

done_testing;

__DATA__
------BOUNDARY
Content-Disposition: form-data; name="upload_foo"; filename="foo.txt"
Content-Type: text/plain

FOO
------BOUNDARY
Content-Disposition: form-data; name="bar"

BAR
------BOUNDARY--



( run in 0.812 second using v1.01-cache-2.11-cpan-b16cb0d3907 )