Mercurial > pub > Impl
comparison Lib/IMPL/Web/HttpResponse.pm @ 239:23daf2fae33a
*security subsytem bugfixes
*HttpResponse: cookies which values are set to undefined will be deleted from browser
author | sergey |
---|---|
date | Tue, 16 Oct 2012 20:14:11 +0400 |
parents | 6d8092d8ce1b |
children | 7c517134c42f |
comparison
equal
deleted
inserted
replaced
238:b8c724f6de36 | 239:23daf2fae33a |
---|---|
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 #used to map a pair name valie to a valid cookie object | 62 #used to map a pair name valie to a valid cookie object |
63 sub _createCookie { | 63 sub _createCookie { |
64 return UNIVERSAL::isa($_[1], 'CGI::Cookie') ? $_[1] : CGI::Cookie->new(-name => $_[0], -value => $_[1] ); | 64 return UNIVERSAL::isa($_[1], 'CGI::Cookie') |
65 ? $_[1] | |
66 : ( defined $_[1] | |
67 ? CGI::Cookie->new(-name => $_[0], -value => $_[1] ) | |
68 : CGI::Cookie->new(-name => $_[0], -expires => '-1d', -value => '') | |
69 ); | |
65 } | 70 } |
66 | 71 |
67 sub InternalError { | 72 sub InternalError { |
68 my ($self,%args) = @_; | 73 my ($self,%args) = @_; |
69 | 74 |