Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from BlueT/master
Browse files Browse the repository at this point in the history
Check $self->origin and set $self->secure(1) only if $self->origin is present in Request.pm
  • Loading branch information
Viacheslav Tykhanovskyi committed Oct 23, 2012
2 parents 89134a1 + 8e9f15b commit 2bf2d21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Protocol/WebSocket/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ sub _finalize {
#return unless $origin;
$self->origin($origin);

$self->secure(1) if $self->origin =~ m{^https:};
if (defined $self->origin) {
$self->secure(1) if $self->origin =~ m{^https:};
}

my $host = $self->field('Host');
return unless $host;
Expand Down

0 comments on commit 2bf2d21

Please sign in to comment.