<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def prepare_for_send(self, full_url=False):
        '''Modify the request to be suitable for HTTP server.

        Args:
            full_url (bool): Use full URL as the URI. By default, only
                the path of the URL is given to the server.
        '''
        assert self.url
        assert self.method
        assert self.version

        url_info = self.url_info

        if 'Host' not in self.fields:
            self.fields['Host'] = url_info.hostname_with_port

        if not full_url:
            if url_info.query:
                self.resource_path = '{0}?{1}'.format(url_info.path, url_info.query)
            else:
                self.resource_path = url_info.path
        else:
            self.resource_path = url_info.url