On Thu Jan 01 05:19:14 2015, STEVAN wrote:
Show quoted text> Nathan,
>
> This is probably just an oversight, have you tried changing it to
> false and running the test suite? If it passes without modification
> and Dave (on the CC) Rolsky's codebase doesn't have issues (I think he
> is currently the largest user of this module), then I see no reason to
> not fix it.
>
> It might also be worth checking the Erlang and Ruby implementations to
> see what they do here (I copied most of the implementation from those
> two versions).
>
> - Stevan
>
>
>
>
> On Wed Dec 31 07:39:11 2014, SMITHFARM wrote:
> > The Web::Machine::Resource POD says that 'valid_content_headers'
> > defaults to false:
> >
> > valid_content_headers( $content_headers )
> >
> > Parameter $content_header is a HASH ref of the Request headers that .
> > . . .
> >
> > If the request includes any invalid Content-* headers, this should
> > return
> > false, which will result in a '501 Not Implemented' response.
> >
> > Defaults to false.
> >
> >
> > In the source code of that module we have:
> >
> > sub valid_content_headers { 1 }
> >
> > which indicates that the documentation is wrong about this.
I suspect this might be a case where the docs should be changed, not the code.
It doesn't make much sense to me to default to false. AFAICT, all of the other boolean "can we continue" methods default to the value that causes the machine to continue. Defaulting to "stop" seems like a bad idea. It'd certainly break all of our code at work, since we haven't implemented this method in our services.