shelf icon indicating copy to clipboard operation
shelf copied to clipboard

Use HttpClient header defaulting for x-powered-by

Open natebosch opened this issue 3 years ago • 2 comments
trafficstars

Fixes #270

The HttpClient from dart:io supports adding default header values to requests that don't already have them. Using this mechanism for the x-powered-by header retains current behavior, but allows the caller to override it by mutating the returns server's defaultResponseHeaders. If a request manually includes a header value it will be retained as before.

natebosch avatar Aug 24 '22 22:08 natebosch

Hmm, this doesn't work for the serveRequests code path.

natebosch avatar Aug 25 '22 02:08 natebosch

Right...grr...

On Wed, Aug 24, 2022 at 9:43 PM Nate Bosch @.***> wrote:

Hmm, this doesn't work for the serveRequests code path.

— Reply to this email directly, view it on GitHub https://github.com/dart-lang/shelf/pull/272#issuecomment-1226704854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEFCVWHWW4FXNGYZES5JTV23MUXANCNFSM57Q6BHWQ . You are receiving this because your review was requested.Message ID: @.***>

kevmoo avatar Aug 25 '22 03:08 kevmoo