Fix bug in HttpRequest