bugfix for create_http_request