caddyserver / forwardproxy

Forward proxy plugin for the Caddy web server
Apache License 2.0
582 stars 218 forks source link

write status first then hijack #126

Open WeidiDeng opened 2 months ago

WeidiDeng commented 2 months ago

1. What does this change do, exactly?

Write Status first then hijack the response writer. This allows the access log to correctly record response status. Also removed some of the redundant error checking.

2. Please link to the relevant issues.

3. Which documentation changes (if any) need to be made because of this PR?

4. Checklist

mholt commented 2 months ago

Thanks Weidi!