NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

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

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine    
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 Foswikirev:7490 Foswikirev:7491 Foswikirev:7522 Foswikirev:7523
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 CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads