Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: CDENT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.17
Fixed in: (no value)



Subject: HTTP::Server::Simple doesn't let PUT or DELETE
Download (untitled) / with headers
text/plain 382b
Hey Jesse, I want to PUT and DELETE to an HTTP::Server::Simple, but I get stopped in _process_request at line 298: if ( $method !~ /^(?:GET|POST|HEAD)$/ ) { $self->bad_request; return; } any reason not to: if ( $method !~ /^(?:GET|POST|HEAD|PUT|DELETE)$/ ) { $self->bad_request; return; } Thanks.
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #17547] HTTP::Server::Simple doesn't let PUT or DELETE
Date: Wed, 8 Feb 2006 18:42:27 -0500
To: via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 647b
Show quoted text
> Hey Jesse, I want to PUT and DELETE to an HTTP::Server::Simple, but I get stopped in > _process_request at line 298: > > if ( $method !~ /^(?:GET|POST|HEAD)$/ ) { > $self->bad_request; > return; > } > > any reason not to: > > if ( $method !~ /^(?:GET|POST|HEAD|PUT|DELETE)$/ ) { > $self->bad_request; > return; > }
No reason at all, but I'd rather break it out into a method called, say valid_http_verb or valid_http_method? That sound sane? (It should be easier to overload, but yes, that seems a sane change for the base server) Show quoted text
> > Thanks. >
--
Subject: Re: [rt.cpan.org #17547] HTTP::Server::Simple doesn't let PUT or DELETE
Date: Wed, 8 Feb 2006 16:02:25 -0800 (PST)
To: Jesse via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: Chris Dent <cdent [...] burningchrome.com>
Download (untitled) / with headers
text/plain 495b
On Wed, 8 Feb 2006, Jesse via RT wrote: Show quoted text
> > any reason not to: > > > > if ( $method !~ /^(?:GET|POST|HEAD|PUT|DELETE)$/ ) { > > $self->bad_request; > > return; > > }
> > > No reason at all, but I'd rather break it out into a method called, say > valid_http_verb or valid_http_method? That sound sane?
valid_http_method sounds perfect -- Chris Dent http://burningchrome.com/~cdent/mt [...]
Subject: Re: [rt.cpan.org #17547] HTTP::Server::Simple doesn't let PUT or DELETE
Date: Wed, 8 Feb 2006 19:10:21 -0500
To: Chris Dent via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 218b
If you're touching the code and coulde easily send the few lines of patch, it'd be much appreciated. I'm stuck in a couple other projects at the moment. But if the patch applies, I'll roll a new release lickidy-split.
Subject: Re: [rt.cpan.org #17547] HTTP::Server::Simple doesn't let PUT or DELETE
Date: Wed, 8 Feb 2006 17:13:47 -0800 (PST)
To: Jesse via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: Chris Dent <cdent [...] burningchrome.com>
Download (untitled) / with headers
text/plain 439b
On Wed, 8 Feb 2006, Jesse via RT wrote: Show quoted text
> If you're touching the code and coulde easily send the few lines of > patch, it'd be much appreciated. I'm stuck in a couple other projects at > the moment. But if the patch applies, I'll roll a new release > lickidy-split.
Right on. It's attached. Does what I need it to do. Thanks -- Chris Dent http://burningchrome.com/~cdent/mt [...]

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

Subject: Re: [rt.cpan.org #17547] HTTP::Server::Simple doesn't let PUT or DELETE
Date: Wed, 8 Feb 2006 21:26:43 -0500
To: Chris Dent via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Thanks. Applied (slightly munged to eliminate duplication) and uploaded to CPAN as 0.18


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.