one final bugfix for write_http.c