Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hidekiy committed Feb 7, 2010
1 parent 829e43a commit 718baa8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/AnyEvent/Twitter/Stream.pm
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ sub new {

$self->{connection_guard} = http_request($request_method, $uri,
headers => {
Accept => '*/*',
Authorization => "Basic $auth",
'Content-Type' => 'application/x-www-form-urlencoded',
Accept => '*/*'
($request_method eq 'POST'
? ('Content-Type' => 'application/x-www-form-urlencoded')
: ()
),
},
body => $request_body,
on_header => sub {
Expand Down
6 changes: 5 additions & 1 deletion t/streaming.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use Test::More;
use Test::TCP;
use Test::Requires qw(Plack::Builder Plack::Request Plack::Server::AnyEvent Try::Tiny);

if ($Plack::Request::VERSION < 0.99) {
plan(skip_all => 'need Plack::Request >= 0.99');
}

my @pattern = (
{
method => 'sample',
Expand Down Expand Up @@ -114,7 +118,7 @@ sub run_streaming_server {
path => $req->path,
request_method => $req->method,
user => $env->{REMOTE_USER},
param => $req->parameters,
param => $req->parameters->mixed,
}) . "\x0D\x0A");

my $count = 1;
Expand Down

0 comments on commit 718baa8

Please sign in to comment.