File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Revision history for Cro::HTTP
4
4
- Support link generation
5
5
- Make http function accept a list of http methods
6
6
- Catch URI parse errors during routing
7
+ - Fix throwing with client-supplied invalid cookie
7
8
8
9
0.8.11
9
10
- Avoid sending a 0-byte WINDOW_UPDATE frame.
Original file line number Diff line number Diff line change @@ -167,6 +167,15 @@ class Cro::HTTP::Request does Cro::HTTP::Message {
167
167
!! @ str [0 ]. value . split (/';' ' ' ? /). List ;
168
168
my @ res ;
169
169
for @ str {
170
+ CATCH {
171
+ when X::TypeCheck::Assignment {
172
+ # Skip cookies with invalid name or value.
173
+ # Since they're received from a client we must not die.
174
+ # But neither we're obliged to maintain them.
175
+ . rethrow unless . symbol eq ' $!value' | ' $!name' ;
176
+ next
177
+ }
178
+ }
170
179
my ($ name , $ value ) = $ _ . split (' =' );
171
180
@ res . push : Cro::HTTP::Cookie. new (: $ name , : $ value ) if $ name ;
172
181
}
You can’t perform that action at this time.
0 commit comments