Skip Menu |
 

This queue is for tickets about the HTTP-Server-Simple CPAN distribution.

Report information
The Basics
Id: 19875
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: sjq [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.18
Fixed in: (no value)



Subject: Incorrect setup() method
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1150205966-16967-22"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 600
Download (untitled) / with headers
text/plain 600b
The setup() method in HTTP::Server::Simple has been coded incorrectly. It currently looks like this: sub setup { my ($self) = @_; while ( my ( $item, $value ) = splice @_, 0, 2 ) { $self->$item($value) if $self->can($item); } } Because $self is not shifted off @_ the while(splice) goes through the list of key-value pairs incorrectly and none of the methods ever get called. I suspect this hasn't been spotted before as most people will be subclassing HTTP::Server::Simple::CGI which overrides the setup() method. Attached is a patch against 0.18. Thanks, Stephen Quinney
Subject: HTTP-Server-Simple.patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1150205966-16967-21"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: text/x-patch; name="HTTP-Server-Simple.patch"
Content-Disposition: inline; filename="HTTP-Server-Simple.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 341
--- lib/HTTP/Server/Simple.pm.orig 2006-06-13 14:09:43.510106000 +0100 +++ lib/HTTP/Server/Simple.pm 2006-06-13 14:28:45.494574000 +0100 @@ -421,7 +421,7 @@ =cut sub setup { - my ($self) = @_; + my $self = shift @_; while ( my ( $item, $value ) = splice @_, 0, 2 ) { $self->$item($value) if $self->can($item); }
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-16967-1150205967-1085.19875-4-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-19875 [...] rt.cpan.org> <rt-3.5.HEAD-16967-1150205967-1085.19875-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: us-ascii
Received: by diesel.bestpractical.com (Postfix, from userid 1000) id 6981B4D823A; Wed, 14 Jun 2006 11:13:23 -0400 (EDT)
Delivered-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
User-Agent: Mutt/1.5.10i
Subject: Re: [rt.cpan.org #19875] Incorrect setup() method
Return-Path: <jesse [...] bestpractical.com>
X-Original-To: bug-HTTP-Server-Simple [...] rt.cpan.org
Date: Wed, 14 Jun 2006 11:13:23 -0400
Message-Id: <20060614151323.GT2115 [...] bestpractical.com>
To: Stephen Quinney via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-16982-1150298018-872.19875-0-0 [...] rt.cpan.org>
Content-Length: 17
Thanks. Applied.
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.0 required=8.0 tests=BAYES_00,DK_SIGNED,DK_VERIFIED,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS
In-Reply-To: <rt-3.5.HEAD-16982-1150298018-872.19875-6-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: pass (x1.develooper.com: domain of stephen.quinney [...] gmail.com designates 66.249.92.175 as permitted sender)
References: <RT-Ticket-19875 [...] rt.cpan.org> <rt-3.5.HEAD-16967-1150205967-1085.19875-4-0 [...] rt.cpan.org> <20060614151323.GT2115 [...] bestpractical.com> <rt-3.5.HEAD-16982-1150298018-872.19875-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: ISO-8859-1
Received: from localhost (diesel.bestpractical.com [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id B5BAE4D8127 for <cpan-bug+http-server-simple [...] diesel.bestpractical.com>; Thu, 15 Jun 2006 04:59:17 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 9C3FF4D80CE for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Thu, 15 Jun 2006 04:59:15 -0400 (EDT)
Received: (qmail 25970 invoked by alias); 15 Jun 2006 08:59:14 -0000
Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.175) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 15 Jun 2006 01:59:13 -0700
Received: by ug-out-1314.google.com with SMTP id j3so747222ugf for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Thu, 15 Jun 2006 01:59:06 -0700 (PDT)
Received: by 10.78.58.11 with SMTP id g11mr468427hua; Thu, 15 Jun 2006 01:59:05 -0700 (PDT)
Received: by 10.78.27.4 with HTTP; Thu, 15 Jun 2006 01:59:05 -0700 (PDT)
Delivered-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #19875] Incorrect setup() method
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=mF57WwEXMgkyq89Y25lM8wQ6YlYGDO7jHtCUS8K8VdoK5nrj4pTaNE6pqu2sBOB0MjZOp511+6704lGLTCTuWX4b/zu4mS3skh4+0rTSt7Spf9CkXuPr7gYX61v0ov/B78Ic8z0sgW/wxtUiHU0SYDJFA+TKsNmjO04Sj6DNStQ=
Return-Path: <stephen.quinney [...] gmail.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
X-Google-Sender-Auth: c4e41715e29b2366
Sender: stephen.quinney [...] gmail.com
Date: Thu, 15 Jun 2006 09:59:05 +0100
Message-Id: <1e8734810606150159w2d7264ct1d1bde547dc5f218 [...] mail.gmail.com>
To: bug-HTTP-Server-Simple [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Stephen Quinney" <sjq [...] debian.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-16982-1150361964-386.19875-0-0 [...] rt.cpan.org>
Content-Length: 298
Download (untitled) / with headers
text/plain 298b
On 14/06/06, Jesse via RT <bug-HTTP-Server-Simple@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=19875 > > > Thanks. Applied. >
Great, are you planning to make a new release soon? I noticed that several bugs listed on rt.cpan have been fixed in svn now. Thanks, Stephen
MIME-Version: 1.0 (Apple Message framework v750)
In-Reply-To: <rt-3.5.HEAD-16982-1150361964-386.19875-5-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.750)
References: <RT-Ticket-19875 [...] rt.cpan.org> <rt-3.5.HEAD-16967-1150205967-1085.19875-4-0 [...] rt.cpan.org> <20060614151323.GT2115 [...] bestpractical.com> <rt-3.5.HEAD-16982-1150298018-872.19875-6-0 [...] rt.cpan.org> <1e8734810606150159w2d7264ct1d1bde547dc5f218 [...] mail.gmail.com> <rt-3.5.HEAD-16982-1150361964-386.19875-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: US-ASCII
Received: from [193.157.177.221] (unknown [193.157.177.221]) by diesel.bestpractical.com (Postfix) with ESMTP id DA1794D8248 for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Thu, 15 Jun 2006 10:59:08 -0400 (EDT)
Delivered-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #19875] Incorrect setup() method
Return-Path: <jesse [...] fsck.com>
X-Original-To: bug-HTTP-Server-Simple [...] rt.cpan.org
Date: Thu, 15 Jun 2006 16:59:07 +0200
Message-Id: <EA9A6941-D220-4862-85BE-E9679B59C884 [...] fsck.com>
To: bug-HTTP-Server-Simple [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Jesse Vincent <jesse [...] fsck.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-16985-1150383560-961.19875-0-0 [...] rt.cpan.org>
Content-Length: 490
Download (untitled) / with headers
text/plain 490b
done On Jun 15, 2006, at 10:59 AM, Stephen Quinney via RT wrote: Show quoted text
> > Queue: HTTP-Server-Simple > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=19875 > > > On 14/06/06, Jesse via RT <bug-HTTP-Server-Simple@rt.cpan.org> wrote:
>> >> <URL: http://rt.cpan.org/Ticket/Display.html?id=19875 > >> >> Thanks. Applied. >>
> > Great, are you planning to make a new release soon? I noticed that > several bugs listed on rt.cpan have been fixed in svn now. > > Thanks, > > Stephen >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.