Skip to content

Instantly share code, notes, and snippets.

@leedo
Created December 12, 2009 23:15
Show Gist options
  • Save leedo/255139 to your computer and use it in GitHub Desktop.
Save leedo/255139 to your computer and use it in GitHub Desktop.
sub _req_headers {
my ($self, $env) = @_;
my @headers;
if ($self->preserve_host_header and $env->{HTTP_HOST}) {
push @headers, "Host", $env->{HTTP_HOST};
}
elsif ($self->rewrite_host_header) {
push @headers, "Host", $self->rewrite_host_header;
}
return @headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment