Implement ws_reset_headers function