Skip to content

Commit

Permalink
Allows middlewares to preserve & modify input stream (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
botic authored Oct 5, 2016
1 parent 0ffad94 commit 0e8c281
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/ringo/jsgi/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ function initRequest(request) {
input = new Stream(request.env.servletRequest.getInputStream());
return input;
},
set: function(stream) {
if (!stream instanceof Stream) {
throw new Error("Input must be a Stream!");
}
input = stream;
},
enumerable: true
});
Object.defineProperty(request.jsgi, "errors", {
Expand Down

0 comments on commit 0e8c281

Please sign in to comment.