Welcome! Log In Create A New Profile

Advanced

Re: Attempting to write a plugin

Anonymous User
March 18, 2012 07:28AM
So in the end, I gave up on C and made a perl module... not what I
wanted but it works - and a whole lot less code

package SecureLink;

use strict;
use warnings;
use nginx;
use Digest::MD5 qw/md5/;
use MIME::Base64;

sub secure {
my ($r, $secret, $path, $ttl) = @_;
$ttl //= 1800;
my $timeout = time() + $ttl;
my $secure = encode_base64(md5("$timeout.$path.$secret"));
$secure =~ tr!+/!-_!;
chomp($secure);
$r->print("$secure,$timeout");
return OK;
}


On 17/03/2012 11:29 AM, Alexandr Gomoliako wrote:
>> I'm afraid all that did was showed me that the crash was happening in the
>> gzip filter - but it wasn't crashing before I added my module so I'm still
>> lost...
> I guess you have no choice but to play with gdb. It's not that hard actually:
>
> gdb --args ./objs/nginx -p mynginx
> > r
> ...
> > bt
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Attempting to write a plugin

Anonymous User 1387 March 16, 2012 09:36AM

Re: Attempting to write a plugin

Mike Gagnon 471 March 16, 2012 11:12AM

Re: Attempting to write a plugin

Anonymous User 445 March 16, 2012 08:12PM

Re: Attempting to write a plugin

Alexandr Gomoliako 461 March 16, 2012 08:20PM

Re: Attempting to write a plugin

Anonymous User 520 March 16, 2012 08:56PM

Re: Attempting to write a plugin

Alexandr Gomoliako 610 March 16, 2012 09:30PM

Re: Attempting to write a plugin

Anonymous User 496 March 18, 2012 07:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 193
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready