Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: jose.mico [...] gmail.com
Cc:
AdminCc:

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



MIME-Version: 1.0
Resent-Date: Fri, 13 Jan 2006 18:05:45 -0500
X-Spam-Status: No, score=0.0 required=7.0 tests=BAYES_50,HTML_MESSAGE autolearn=ham version=3.1.0
X-Mailer: Microsoft Outlook Express 5.50.4927.1200
Resent-Message-Id: <20060113230545.GI1062 [...] bestpractical.com>
References: <20051109183302.GF9217 [...] bestpractical.com>
Content-Type: multipart/mixed; boundary="----=_NextPart_000_0007_01C6186E.15C04870"
Resent-To: bug-http-server-simple [...] rt.cpan.org
Received: by diesel.bestpractical.com (Postfix, from userid 1002) id 7A5D74D8098; Fri, 13 Jan 2006 18:05:45 -0500 (EST)
Received: from postino5.prima.com.ar (unknown [200.42.0.178]) by diesel.bestpractical.com (Postfix) with SMTP id 240AF4D82C6 for <jesse [...] bestpractical.com>; Fri, 13 Jan 2006 16:27:25 -0500 (EST)
Received: (qmail 21304 invoked from network); 13 Jan 2006 21:20:15 -0000
Received: from unknown (HELO MICO) (adsl3110 [...] ciudad-rosario-glb [...] 200.82.106.11) by postino5.prima.net.ar with SMTP; 13 Jan 2006 21:20:15 -0000
Delivered-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
Subject: HTTP::Server::Simple and bad requests
Resent-From: j [...] bestpractical.com
X-Msmail-Priority: Normal
Return-Path: <j [...] bestpractical.com>
X-Priority: 3
X-Original-To: bug-http-server-simple [...] rt.cpan.org
X-Original-To: jesse [...] bestpractical.com
Date: Fri, 13 Jan 2006 18:20:51 -0300
X-Spam-Level:
X-Greylist: delayed 398 seconds by postgrey-1.21 at diesel; Fri, 13 Jan 2006 16:27:26 EST
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on diesel.bestpractical.com
Message-Id: <000b01c61887$3d49b4d0$0b00a8c0 [...] MICO>
X-Mimeole: Produced By Microsoft MimeOLE V5.50.4927.1200
To: "Jesse Vincent" <jesse [...] bestpractical.com>
From: José Micó <jose.mico [...] gmail.com>
Content-Length: 0
content-type: application/octet-stream; name="server_bug.pl"
content-disposition: attachment; filename="server_bug.pl"
Content-Transfer-Encoding: quoted-printable
Content-Length: 1256
Download server_bug.pl
text/x-perl 1.2k

Message body is not shown because sender requested not to inline it.

Content-Type: multipart/alternative; boundary="----=_NextPart_001_0008_01C6186E.15C04870"
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 164
Download (untitled) / with headers
text/plain 164b
Attached file describe a problem of HTTP::Server::Simple when bad requests are received. I cannot provide a fix, as I don't know the right action to take... José
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 505
MIME-Version: 1.0
In-Reply-To: <000b01c61887$3d49b4d0$0b00a8c0 [...] MICO>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <20051109183302.GF9217 [...] bestpractical.com> <000b01c61887$3d49b4d0$0b00a8c0 [...] MICO>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-6413-1248038262-1296.17062-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 445
Download (untitled) / with headers
text/plain 445b
On Fri Jan 13 18:05:48 2006, jose.mico@gmail.com wrote: Show quoted text
> Attached file describe a problem of HTTP::Server::Simple when bad > requests are received. > I cannot provide a fix, as I don't know the right action to take... > > José
I'm not sure this makes any sense, does it? $ perl -e '("", "", "") or print "hey there\n";' hey there why are you assuming that a list with 3 empty string elements would be equivalent to a false condition?
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-6413-1248038262-1296.17062-6-0 [...] rt.cpan.org>
References: <RT-Ticket-17062 [...] rt.cpan.org> <20051109183302.GF9217 [...] bestpractical.com> <000b01c61887$3d49b4d0$0b00a8c0 [...] MICO> <rt-3.6.HEAD-6413-1248038262-1296.17062-6-0 [...] rt.cpan.org>
Message-ID: <4A63BC12.2080000 [...] gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 2553F4D8117 for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Sun, 19 Jul 2009 20:36:48 -0400 (EDT)
Received: (qmail 29562 invoked by uid 103); 20 Jul 2009 00:36:47 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 20 Jul 2009 00:36:47 -0000
Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.173) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sun, 19 Jul 2009 17:36:42 -0700
Received: by wf-out-1314.google.com with SMTP id 25so591088wfa.27 for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Sun, 19 Jul 2009 17:36:39 -0700 (PDT)
Received: by 10.142.43.7 with SMTP id q7mr818934wfq.112.1248050199127; Sun, 19 Jul 2009 17:36:39 -0700 (PDT)
Received: from ?190.137.207.96? (host96.190-137-207.telecom.net.ar [190.137.207.96]) by mx.google.com with ESMTPS id 28sm11759209wfg.25.2009.07.19.17.36.36 (version=SSLv3 cipher=RC4-MD5); Sun, 19 Jul 2009 17:36:37 -0700 (PDT)
Delivered-To: cpan-bug+HTTP-Server-Simple [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17062] HTTP::Server::Simple and bad requests
User-Agent: Thunderbird 2.0.0.22 (X11/20090608)
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=kHQegDb8HgoSA7uKhq0UZGY8auaOi77GvpueDL7iS+3qoc0TyFhxUM5Su52wJXZsV1 Lk/fOVKvtPT1mxclxxsrTjfkQe4fKDDRJRhXhVEGrBQ95CxvXtTm/58DnUnPy5aLB+zN Kt+su2w9Obskzi/a1Rm1IhkAhdRhwTRW1b2oc=
Return-Path: <jose.mico [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Nf0qmnhLBfPuJZzwGD/ca3E/GrRoV83BSzxkzhvA2p0=; b=mizIKcTqXzDNQOvt2YY9zk9E3+S/ps8p7mHEbjxbC02q73KZ+2zFDBHKmTOh+elvYV LAdFMIUAT69GItldv8GDx4UK9bJwrMUTcjt8PWgEjBMrjBlMYCyXlBqOAF/nxqxrvFaR CWwLV+zmvT+s4VG+F0PNnMRN+rDErMABoXzV4=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-HTTP-Server-Simple [...] rt.cpan.org
Date: Sun, 19 Jul 2009 21:36:34 -0300
X-Spam-Level: *
To: bug-HTTP-Server-Simple [...] rt.cpan.org
Content-Transfer-Encoding: 8bit
From: José Micó <jose.mico [...] gmail.com>
RT-Message-ID: <rt-3.6.HEAD-6413-1248050218-1363.17062-0-0 [...] rt.cpan.org>
Content-Length: 1236
Download (untitled) / with headers
text/plain 1.2k
http://brianhammond.com/ via RT wrote: Show quoted text
> On Fri Jan 13 18:05:48 2006, jose.mico@gmail.com wrote: >
That was three and half years ago :-) I dont' remember exactly what was the problem, let's see how good my report was ;-) Show quoted text
> $ perl -e '("", "", "") or print "hey there\n";' > hey there > > why are you assuming that a list with 3 empty string elements would be > equivalent to a false condition? >
Exactly the opposite, seems that I've founded a place where returning ("", "", "") is not evaluated to a false condition as it should be. The problem was subtle, and was triggered because the returned list was evaluated in list context (so was always 3), and the 'or' block was never executed. Note that the following does not output anythig: $ perl -e '@foo = ("", "", "") or print "hey there\n";' Looking into the source, I can see that the buggy: my ( $method, $request_uri, $proto ) = $self->parse_request or do { $self->bad_request } ...was already replaced by the more sane: my ( $method, $request_uri, $proto ) = $self->parse_request; unless ($self->valid_http_method($method) ) { $self->bad_request } So that bug does not exist anymore, and you can safely close the ticket :-) José


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.