Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mention browser versions
  • Loading branch information
kraih committed Sep 12, 2012
1 parent 17567e7 commit a20947f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
8 changes: 4 additions & 4 deletions t/mojo/request.t
Expand Up @@ -1652,7 +1652,7 @@ $req->parse("POST /example/testform_handler HTTP/1.1\x0d\x0a"
ok $req->is_finished, 'request is finished';
is $req->param('Vorname'), 'T', 'right value';

# Google Chrome multipart/form-data request
# Google Chrome 5 multipart/form-data request
$req = Mojo::Message::Request->new;
$req->parse("POST / HTTP/1.0\x0d\x0a"
. "Host: 127.0.0.1:10002\x0d\x0a"
Expand Down Expand Up @@ -1717,7 +1717,7 @@ is $upload->filename, 'аватар.jpg', 'right filename';
is $upload->size, 4, 'right size';
is $upload->slurp, '1234', 'right content';

# Firefox multipart/form-data request
# Firefox 3.5.8 multipart/form-data request
$req = Mojo::Message::Request->new;
$req->parse("POST / HTTP/1.0\x0d\x0a"
. "Host: 127.0.0.1:10002\x0d\x0a"
Expand Down Expand Up @@ -1787,7 +1787,7 @@ is $upload->filename, 'аватар.jpg', 'right filename';
is $upload->size, 4, 'right size';
is $upload->slurp, '1234', 'right content';

# Opera multipart/form-data request
# Opera 9.8 multipart/form-data request
$req = Mojo::Message::Request->new;
$req->parse("POST / HTTP/1.0\x0d\x0a"
. "Host: 127.0.0.1:10002\x0d\x0a"
Expand Down Expand Up @@ -1852,7 +1852,7 @@ is $upload->filename, 'аватар.jpg', 'right filename';
is $upload->size, 4, 'right size';
is $upload->slurp, '1234', 'right content';

# Firefox multipart/form-data request (UTF-8)
# Firefox 14 multipart/form-data request (UTF-8)
$req = Mojo::Message::Request->new;
$req->parse("POST /foo HTTP/1.1\x0d\x0a");
$req->parse("Host: 127.0.0.1:3000\x0d\x0a");
Expand Down
28 changes: 13 additions & 15 deletions t/mojo/request_cgi.t
Expand Up @@ -4,7 +4,7 @@ use Test::More tests => 162;

use Mojo::Message::Request;

# Parse Lighttpd like CGI environment variables and a body
# Parse Lighttpd CGI environment variables and body
my $req = Mojo::Message::Request->new;
my $body;
$req->content->on(body => sub { $body++ });
Expand Down Expand Up @@ -37,8 +37,7 @@ is $req->url->to_abs->to_string,
'http://localhost:8080/te+st/index.cgi/foo/bar?lalala=23&bar=baz',
'right absolute URL';

# Parse Lighttpd like CGI environment variables and a body
# (behind reverse proxy)
# Parse Lighttpd CGI environment variables and body (behind reverse proxy)
$req = Mojo::Message::Request->new;
$req->parse(
HTTP_CONTENT_LENGTH => 11,
Expand Down Expand Up @@ -66,7 +65,7 @@ is $req->url->to_abs->to_string,
'http://mojolicio.us/test/index.cgi/foo/bar?lalala=23&bar=baz',
'right absolute URL';

# Parse Apache like CGI environment variables and a body
# Parse Apache CGI environment variables and body
$req = Mojo::Message::Request->new;
$req->parse(
CONTENT_LENGTH => 11,
Expand Down Expand Up @@ -95,7 +94,7 @@ is $req->url->to_abs->to_string,
'http://localhost:8080/test/index.cgi/foo/bar?lalala=23&bar=baz',
'right absolute URL';

# Parse Apache like CGI environment variables with basic authentication
# Parse Apache CGI environment variables with basic authentication
$req = Mojo::Message::Request->new;
$req->parse(
CONTENT_LENGTH => 11,
Expand Down Expand Up @@ -131,7 +130,7 @@ is $req->url->base->userinfo, 'Aladdin:open sesame', 'right userinfo';
is $req->url, 'foo/bar?lalala=23&bar=baz', 'right URL';
is $req->proxy->userinfo, 'Aladdin:open sesame', 'right proxy userinfo';

# Parse Apache 2.2 (win32) like CGI environment variables and a body
# Parse Apache 2.2 (win32) CGI environment variables and body
$req = Mojo::Message::Request->new;
my ($finished, $progress);
$req->on(finish => sub { $finished = shift->is_finished });
Expand Down Expand Up @@ -179,7 +178,7 @@ is $req->param('edition'), 'db6d8b30-16df-4ecd-be2f-c8194f94e1f4',
'right value';
is $req->url->to_abs->to_string, 'http://test1/index.pl', 'right absolute URL';

# Parse Apache 2.2 (win32) like CGI environment variables and a body
# Parse Apache 2.2 (win32) CGI environment variables and body
$req = Mojo::Message::Request->new;
$req->parse(
CONTENT_LENGTH => 87,
Expand Down Expand Up @@ -210,7 +209,7 @@ is $req->param('edition'), 'db6d8b30-16df-4ecd-be2f-c8194f94e1f4',
'right value';
is $req->url->to_abs->to_string, 'http://test1/index.pl', 'right absolute URL';

# Parse Apache 2.2.14 like CGI environment variables and a body (root)
# Parse Apache 2.2.14 CGI environment variables and body (root)
$req = Mojo::Message::Request->new;
$req->parse(
SCRIPT_NAME => '/upload',
Expand Down Expand Up @@ -251,7 +250,7 @@ is_deeply $req->param('hello'), 'world', 'right parameters';
is $req->url->to_abs->to_string, 'http://127.0.0.1:13028/upload',
'right absolute URL';

# Parse Apache 2.2.11 like CGI environment variables and a body (HTTPS)
# Parse Apache 2.2.11 CGI environment variables and body (HTTPS)
$req = Mojo::Message::Request->new;
$req->parse(
CONTENT_LENGTH => 11,
Expand All @@ -277,7 +276,7 @@ is_deeply $req->param('hello'), 'world', 'right parameters';
is $req->url->to_abs->to_string, 'https://localhost/test/index.cgi/foo/bar',
'right absolute URL';

# Parse Apache 2.2.11 like CGI environment variables and a body
# Parse Apache 2.2.11 CGI environment variables and body
# (trailing slash)
$req = Mojo::Message::Request->new;
$req->parse(
Expand All @@ -302,7 +301,7 @@ is_deeply $req->param('hello'), 'world', 'right parameters';
is $req->url->to_abs->to_string, 'http://localhost/test/index.cgi/foo/bar/',
'right absolute URL';

# Parse Apache 2.2.11 like CGI environment variables and a body
# Parse Apache 2.2.11 CGI environment variables and body
# (no SCRIPT_NAME)
$req = Mojo::Message::Request->new;
$req->parse(
Expand All @@ -326,7 +325,7 @@ is_deeply $req->param('hello'), 'world', 'right parameters';
is $req->url->to_abs->to_string, 'http://localhost/foo/bar',
'right absolute URL';

# Parse Apache 2.2.11 like CGI environment variables and a body
# Parse Apache 2.2.11 CGI environment variables and body
# (no PATH_INFO)
$req = Mojo::Message::Request->new;
$req->parse(
Expand All @@ -350,7 +349,7 @@ is_deeply $req->param('hello'), 'world', 'right parameters';
is $req->url->to_abs->to_string, 'http://localhost/test/index.cgi',
'right absolute URL';

# Parse Apache 2.2.9 like CGI environment variables (root without PATH_INFO)
# Parse Apache 2.2.9 CGI environment variables (root without PATH_INFO)
$req = Mojo::Message::Request->new;
$req->parse(
SCRIPT_NAME => '/cgi-bin/myapp/myapp.pl',
Expand All @@ -370,8 +369,7 @@ is $req->version, '1.1', 'right version';
is $req->url->to_abs->to_string, 'http://getmyapp.org/cgi-bin/myapp/myapp.pl',
'right absolute URL';

# Parse Apache mod_fastcgi like CGI environment variables
# (multipart file upload)
# Parse Apache mod_fastcgi CGI environment variables (multipart file upload)
$req = Mojo::Message::Request->new;
is $req->content->progress, 0, 'right progress';
$req->parse(
Expand Down

0 comments on commit a20947f

Please sign in to comment.