You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an attempt to fix the behavior of httptest.ResponseRecorder to mimic reality more closely (issues #8857 and #14914), commit c69e686 broke reality in the opposite end: now the recorder will not display headers unless one of Write, WriteHeader, or Flush, is called explicitly, which is not what happens on an actual handler.
This broke actual tests we had in 1.6 after running with the httptest package from tip.
As a suggested fix for both cases, the recorded headers should be frozen when Write or WriteHeader is observed, rather than completely hidden from tests until then.