Skip to content

Commit

Permalink
replace deprecated proxy method in Mojo::Message::Request with an att…
Browse files Browse the repository at this point in the history
…ribute
  • Loading branch information
kraih committed Jan 7, 2016
1 parent a2469e6 commit e18a3b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,5 +1,7 @@

6.40 2016-01-07
- Replaced deprecated proxy method in Mojo::Message::Request with an
attribute.
- Added SNI support to all built-in web servers. (bpmedley, sri)

6.39 2016-01-03
Expand Down Expand Up @@ -78,7 +80,6 @@
6.25 2015-10-21
- Deprecated Mojo::Message::Request::proxy with boolean and string arguments
in favor of Mojo::Message::Request::via_proxy.
- Replaced proxy method in Mojo::Message::Request with an attribute.
- Moved all bundled files into "resources" directories.
- Added via_proxy attribute to Mojo::Message::Request.
- Improved Mojo::DOM::CSS to support selectors with leading and trailing
Expand Down
22 changes: 2 additions & 20 deletions lib/Mojo/Message/Request.pm
Expand Up @@ -2,12 +2,12 @@ package Mojo::Message::Request;
use Mojo::Base 'Mojo::Message';

use Mojo::Cookie::Request;
use Mojo::Util qw(b64_encode b64_decode deprecated);
use Mojo::Util qw(b64_encode b64_decode);
use Mojo::URL;

has env => sub { {} };
has method => 'GET';
has 'reverse_proxy';
has [qw(proxy reverse_proxy)];
has url => sub { Mojo::URL->new };
has via_proxy => 1;

Expand Down Expand Up @@ -144,24 +144,6 @@ sub parse {
return $self;
}

# DEPRECATED in Clinking Beer Mugs!
sub proxy {
my $self = shift;

return $self->{proxy} unless @_;

deprecated 'Calling Mojo::Message::Request::proxy with a boolean argument is'
. ' DEPRECATED in favor of Mojo::Message::Request::via_proxy'
and return $self->via_proxy(0)
unless $_[0];
deprecated
'Calling Mojo::Message::Request::proxy with a string argument is DEPRECATED'
unless ref $_[0];

$self->{proxy} = ref $_[0] ? shift : Mojo::URL->new(shift);
return $self;
}

sub query_params { shift->url->query }

sub start_line_size { length shift->_start_line->{start_buffer} }
Expand Down

0 comments on commit e18a3b7

Please sign in to comment.