fix: response headers can be discarded in some cases

Fix: response headers can be discarded in some cases