From: Florian Ragwitz Date: Sun, 23 Jan 2011 15:42:37 +0000 (+0000) Subject: Merge branch 'master' into psgi X-Git-Tag: 5.89000~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=681086e7279935c38cae4b84264dc73b02b63df1 Merge branch 'master' into psgi master: Version 5.80030 Fix a warning with undef bodies Changelog the Package::Stash bugfix Changelog the resp->body improvements Work with PP Package::Stash again now the incorrect assumption that broke with ::XS is fixed Stop relying on Package::Stash PP bugs Add conflict Bad test failed to show bug. Fix the case for body '0' Make response body able to be undef to allow RenderView to see 'defined but empty' body, allowing X-Sendfile to work nicer. Also removes horrible modifier code. win/win if it doesn't break anything else. Extra links in docs Add test case for uri_for() with #fragment and query params, broken by 5.7008 when uri_for() was reimplemented without URI.pm. Found a another fault in chained action dispatcher. Conflicts: lib/Catalyst/Engine/CGI.pm --- 681086e7279935c38cae4b84264dc73b02b63df1 diff --cc lib/Catalyst/Engine.pm index 52c38cb,e770f32..407ceb5 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@@ -839,12 -669,33 +839,12 @@@ sub write $self->_prepared_write(1); } -- return 0 if !defined $buffer; - - my $len = length($buffer); - my $wrote = syswrite STDOUT, $buffer; - - if ( !defined $wrote && $! == EWOULDBLOCK ) { - # Unable to write on the first try, will retry in the loop below - $wrote = 0; - } - - if ( defined $wrote && $wrote < $len ) { - # We didn't write the whole buffer - while (1) { - my $ret = syswrite STDOUT, $buffer, $CHUNKSIZE, $wrote; - if ( defined $ret ) { - $wrote += $ret; - } - else { - next if $! == EWOULDBLOCK; - return; - } ++ $buffer = q[] unless defined $buffer; - last if $wrote >= $len; - } - } + my $len = length($buffer); + $self->_writer->write($buffer); - return $wrote; + return $len; } =head2 $self->unescape_uri($uri)