diff --git a/orrg.pl b/orrg.pl

index 8735c34a93216ac785b347e3abe51dffce7f4d87..2df2ded24637be2b68cb621969d10661916b226e 100755

--- a/orrg.pl

+++ b/orrg.pl

@@ -38,13 +38,13 @@ );

if (!defined($ENV{'SERVER_PROTOCOL'}) || $ENV{'SERVER_PROTOCOL'} ne 'GEMINI')

{

- write_response('CGI_ERROR', '', undef);

+ write_response('CGI_ERROR', '', undef);

}

my $query = lc(uri_unescape($ENV{'QUERY_STRING'}));

if ($query eq '' || $query !~ /^https\:\/\//) {

- write_response('INPUT', 'Paste the URI of the rss feed you want to read:', undef);

+ write_response('INPUT', 'Paste the URI of the rss feed you want to read:', undef);

}

write_response('SUCCESS', 'text/gemini', create_response($query));

@@ -52,7 +52,7 @@ exit;

sub create_response

{

- my ( $qs ) = @_;

+ my ( $qs ) = @_;

my @body = ();

my $feed = XML::FeedPP->new($qs, utf8_flag => 1);

@@ -62,7 +62,7 @@ push @body, ('# orrg error', '', 'The requested feed could not be loaded. :(', '', '=> '. $qs .' open feed in browser');

return @body;

}

- push @body, '# '. $feed->title;

+ push @body, '# '. $feed->title;

push @body, 'fetched '. strftime('%Y-%m-%dT%H:%M:%SZ', gmtime());

$feed->description eq '' or push @body, ('', $feed->description);

$feed->image eq '' or push @body, '=> '. $feed->image .' feed image';

@@ -73,23 +73,23 @@ foreach my $it ($feed->get_item()) {

push @body, '### '. $it->title;

$it->pubDate eq '' or push @body, 'published '. $it->pubDate;

push @body, '';

- $it->description eq '' or push @body, $it->description;

+ $it->description eq '' or push @body, $it->description;

$it->link eq '' or push @body, ('=> '.$it->link.' open entry in browser', '');

}

-

- return @body;

+

+ return @body;

}

sub write_response

{

- my ($returncode, $meta, @content) = @_;

-

+ my ($returncode, $meta, @content) = @_;

+

if (!defined($RC{$returncode})) { die "Unknown response code!"; }

- printf("%d %s\r\n", $RC{$returncode}, ($meta eq '') ? $returncode : $meta);

- foreach (@content) {

- print("$_\r\n");

- }

+ printf("%d %s\r\n", $RC{$returncode}, ($meta eq '') ? $returncode : $meta);

+ foreach (@content) {

+ print("$_\r\n");

+ }

- exit;

+ exit;

}