Skip to content

Commit

Permalink
Merge pull request #200 from JJ/master
Browse files Browse the repository at this point in the history
Hash order was changed in the last release
  • Loading branch information
AlexDaniel committed May 31, 2018
2 parents 355bf49 + 995a74e commit bade43d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion META6.json
Expand Up @@ -44,7 +44,7 @@
"HTTP::UserAgent": "lib/HTTP/UserAgent.pm6",
"HTTP::UserAgent::Common": "lib/HTTP/UserAgent/Common.pm6"
},
"version": "1.1.40",
"version": "1.1.41",
"meta-version": "0",
"authors": [
"sergot"
Expand Down
2 changes: 1 addition & 1 deletion lib/HTTP/Header.pm6
Expand Up @@ -118,7 +118,7 @@ method clear() {

# get header as string
method Str($eol = "\n") {
@.fields.map({ "{$_.name}: {self.field($_.name)}$eol" }).flat.join;
@.fields.map({ "{$_.name}: {self.field($_.name)}$eol" }).flat.sort.join;
}

method parse($raw) {
Expand Down
4 changes: 2 additions & 2 deletions t/040-request.t
Expand Up @@ -50,7 +50,7 @@ lives-ok { $r1.set-method: 'PUT' }, "set method";
is $r1.method, 'PUT', 'set-method 1/1';

# parse
my $req = "GET /index HTTP/1.1\r\nHost: somesite\r\nAccept: test\r\n\r\nname=value&a=b\r\n";
my $req = "GET /index HTTP/1.1\r\nAccept: test\r\nHost: somesite\r\n\r\nname=value&a=b\r\n"; # Remember to use alphabetical order
$r1 = HTTP::Request.new.parse($req);

is $r1.method, 'get'.uc, 'parse 1/6';
Expand All @@ -66,7 +66,7 @@ subtest {
is $r.method, 'GET', "right method";
is $r.file, '/bar', "right file";
is $r.field('Host'), 'foo.com', 'got right host';
}, "positional construcutor";
}, "positional constructor";

subtest {
subtest {
Expand Down

0 comments on commit bade43d

Please sign in to comment.