Add psgix cleanup proposal #26

Merged
merged 1 commit into from Oct 10, 2012
Commits on Oct 10, 2012
  1. @avar

    PSGI::Extensions: add a modified PSGI environment cleanup handlers pr…

    avar committed Sep 30, 2012
    …oposal
    
    This is an import of the proposal at
    https://github.com/Plack/psgi-specs/wiki/Proposal%3A-PSGI-environment-cleanup-handlers
    with the following changes:
    
     * Fixed various typos & grammar error
    
     * We now say that psgix.cleanup.handlers MUST be ArrayRef
    
       I don't see any reason for why a server would support cleanup mode but
       wouldn't be capable of initializing psgix.cleanup.handlers to []. Just
       make this a MUST since having the server initialize it is easier, and
       if it can't create an empty ArrayRef in $env at the start of the
       request it probably can't support Plack (or Perl) at all.
    
     * Add background on what the cleanup handlers are for
    
       I think it helps to add a bit of background here to be explicit about
       what this feature is for, and in particular make sure that servers
       aren't going to implement this in some blocking fashion while the
       client is still waiting on them.
    
    In addition the pull request originally contained two new boolean
    flags, see "PSGI::Extensions: add two new boolean flags to the cleanup
    spec", but after discussing it with miyagawa we decided to drop that
    part.