Issue #98 resolved

Set cpg.response.wfile before calling initRequest

Anonymous created an issue

Some filters need to redirect or wrap the {{{wfile}}} stream before the output chain is started. Currently the code that sets {{{cpg.response.wfile}}} is called only after the input chain is processed.

Reported by cribeiro

Comments (4)

  1. Anonymous


    On revision #138 two modifications were done:

    • Set the cpg.response.wfile and cpg.response.sendResponse attributes '''before''' calling initRequest. This way filters that are called on the input chain can access the information (specially wfile) that is needed.
    • Also, made sure that the handleRequest call uses the value from cpg.response.wfile instead of the local wfile; this allows the filter to redirect or to wrap the original wfile and set the new one on cpg.response.wfile.
  2. Log in to comment