Item9045: Should we really allow the web server to fill in a 200 Status?

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: KennethLavrsen
by not setting the status explicitly (and defaulting to an error condition), we run the 'risk' of sending a 200 code even when there is an unexpected error.

I propose to change this only in DEBUG mode - 500 perhaps.

-- SvenDowideit - 21 May 2010

sub new {
    my $proto = shift;
    my $class = ref($proto) || $proto;
    my $this  = {
        status          => undef,       #web server fills in 200 if status is not set
        headers         => {},
        body            => undef,
        charset         => 'ISO-8859-1',
        cookies         => [],
        startedPrinting => 0,
    };
    #SMELL: default to 500 in debug modeso we can shake out the missing Status's
    $this->{status} = 500 if DEBUG;
    return bless $this, $class;
}

-- SvenDowideit - 21 May 2010

Agreed.

-- CrawfordCurrie - 22 May 2010
 

ItemTemplate edit

Summary Should we really allow the web server to fill in a 200 Status?
ReportedBy SvenDowideit
Codebase trunk
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:7e2325c9ba65 distro:21ba31cce130 distro:4925bad4db55 distro:2c651ab54b6a
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r9 - 04 Oct 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy