shelf icon indicating copy to clipboard operation
shelf copied to clipboard

Add context to Response for including file and file_not_found to be identified by other shelf Middleware.

Open gmpassos opened this issue 8 months ago • 11 comments

With the Response.context populated with the processed file, other middleware can manipulate the response in an optimized way and ensure the correct processed file. Without this, another middleware would need to guess the processed file and, in some cases, re-resolve File.stat and fix the directory path to the "index.html" path.

This is the continuation of the PR: https://github.com/dart-lang/shelf/pull/395

(This was needed to release my shelf/master fork for another PR).


  • [✅ ] I’ve reviewed the contributor guide and applied the relevant portions to this PR.

gmpassos avatar Jun 14 '24 05:06 gmpassos