Add psgix cleanup proposal #26

merged 1 commit into from Oct 10, 2012

2 participants


I think this pull request is ready as-is, but I'm mostly submitting it so that there's a place to discuss this on GitHub without discussions being nuked away by non-fast-forward commits.

plack member

Just for the sake of logs, I do not like the complexity of so many flags introduced by this.


You mean for the sake of the changelogs?

I don't like the complexity of these flags either, but I like the complexity of not having them even less.

Maybe I'm being overly paranoid but by having flags indicating what sort of cleanup implementation the server provides you can easily ensure on the application level that your code is going to behave the way you expect it to.

Without a flag you either can't, or you end up having to manage that information outside of PSGI somehow, or more likely your code will just silently start acting slightly differently.

plack member

Fair enough, does it look good otherwise? I'll update the pull request to drop that patch.


Updated the request to omit the patch adding the two new boolean flags.

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

This is an import of the proposal at
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
@miyagawa miyagawa merged commit abf067a into plack:master Oct 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment