Skip to content

Commit dc6b07c

Browse files
committed
- bumped version to 0.5.7.
- use dist_dir rather than module_dir in Captha.pm and better diagnostics.
1 parent 4e80d90 commit dc6b07c

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

META.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ requires:
7575
Time::HiRes: 0
7676
YAML::Syck: 1.04
7777
perl: 5.6.1
78-
version: 0.5.6
78+
version: 0.5.7

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NAME
22
OpenResty - General-purpose web service platform for web applications
33

44
VERSION
5-
This document describes OpenResty 0.5.6 released on May 3, 2009.
5+
This document describes OpenResty 0.5.7 released on May 4, 2009.
66

77
DESCRIPTION
88
This module implements the server-side OpenResty web service protocol.

bin/releng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env perl
1+
#!/opt/perl/bin/perl
22

33
use strict;
44
use warnings;

demo/Admin/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ upload2: pack
5151
upload: all
5252
script/upload
5353

54+
push:
55+
-mkdir -p /opt/eeeeresty/htdocs/admin/
56+
cp -rup `pwd`/out/* /opt/eeeeresty/htdocs/admin/
57+

lib/OpenResty/Handler/Captcha.pm

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55

66
use utf8;
77

8-
use File::ShareDir qw(module_dir);
8+
use File::ShareDir qw(dist_dir);
99
use File::Spec;
1010
use Crypt::CBC;
1111
use MIME::Base64;
@@ -24,12 +24,19 @@ sub level2name {
2424

2525
my $FontPath = "$FindBin::Bin/../share/font/wqy-zenhei.ttf";
2626
eval {
27-
if ( !-f $FontPath )
28-
{
29-
$FontPath = File::Spec->catfile( module_dir('OpenResty'),
27+
if ( !-f $FontPath ) {
28+
$FontPath = File::Spec->catfile( dist_dir('OpenResty'),
3029
'font/wqy-zenhei.ttf' );
30+
if ( ! -f $FontPath || !-r $FontPath ) {
31+
warn "WARNING: Chinese font file $FontPath not found or not readable.\n";
32+
} else {
33+
#warn "Found chinese font file $FontPath.\n";
34+
}
3135
}
3236
};
37+
if ($@) {
38+
warn $@;
39+
}
3340

3441
my $PLAINTEXT_SEP = ":"; # separator character in plaintext str
3542
my $MIN_TIMESPAN = 1; # minimum timespan(sec) for a valid Captcha,

0 commit comments

Comments
 (0)