diff options
author | David Reiss <dreiss@apache.org> | 2008-02-06 22:18:40 +0000 |
---|---|---|
committer | David Reiss <dreiss@apache.org> | 2008-02-06 22:18:40 +0000 |
commit | 0c90f6f8af1d64ec9272bb2f6092336f3d0b8df8 (patch) | |
tree | 15245f459a76acc769d8fe99179176b4965bf66d /lib/perl | |
parent | 3160971286aea0d5b28d5a7a87acaa8a12209ef8 (diff) | |
download | thrift-0c90f6f8af1d64ec9272bb2f6092336f3d0b8df8.tar.gz |
Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'lib/perl')
-rw-r--r-- | lib/perl/COPYING | 2 | ||||
-rw-r--r-- | lib/perl/LICENSE | 2 | ||||
-rw-r--r-- | lib/perl/lib/Thrift/HttpClient.pm | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/perl/COPYING b/lib/perl/COPYING index 039f21e3e..0101a7dc8 100644 --- a/lib/perl/COPYING +++ b/lib/perl/COPYING @@ -1,5 +1,5 @@ Thrift Software License -Copyright (c) 2006- Facebook, Inc. +Copyright (c) 2006- Facebook, Inc. Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by diff --git a/lib/perl/LICENSE b/lib/perl/LICENSE index 039f21e3e..0101a7dc8 100644 --- a/lib/perl/LICENSE +++ b/lib/perl/LICENSE @@ -1,5 +1,5 @@ Thrift Software License -Copyright (c) 2006- Facebook, Inc. +Copyright (c) 2006- Facebook, Inc. Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by diff --git a/lib/perl/lib/Thrift/HttpClient.pm b/lib/perl/lib/Thrift/HttpClient.pm index 854149b15..9f79838cf 100644 --- a/lib/perl/lib/Thrift/HttpClient.pm +++ b/lib/perl/lib/Thrift/HttpClient.pm @@ -30,10 +30,10 @@ sub new my $classname = shift; my $url = shift || 'http://localhost:9090'; my $debugHandler = shift; - + my $out = IO::String->new; binmode($out); - + my $self = { url => $url, out => $out, @@ -111,9 +111,9 @@ sub readAll { my $self = shift; my $len = shift; - + my $buf = $self->read($len); - + if (!defined($buf)) { die new Thrift::TException('TSocket: Could not read '.$len.' bytes from input buffer'); } @@ -127,9 +127,9 @@ sub read { my $self = shift; my $len = shift; - + my $buf; - + my $in = $self->{in}; if (!defined($in)) { @@ -170,20 +170,20 @@ sub flush $ua->default_header('Accept' => 'application/x-thrift'); $ua->default_header('Content-Type' => 'application/x-thrift'); $ua->cookie_jar({}); # hash to remember cookies between redirects - + my $out = $self->{out}; $out->setpos(0); # rewind my $buf = join('', <$out>); - + my $request = new HTTP::Request(POST => $self->{url}, undef, $buf); my $response = $ua->request($request); my $content_ref = $response->content_ref; - + my $in = IO::String->new($content_ref); binmode($in); $self->{in} = $in; $in->setpos(0); # rewind - + # reset write buffer $out = IO::String->new; binmode($out); |