'Add data from the content creator\'s request object.
Includes:
- The base blog address
- The author information
- Named HTTP headers
- Other HTTP headers, as modeled by Akismet\'s Wordpress plugin:
https://plugins.trac.wordpress.org/browser/akismet/trunk/class.akismet.php'

def set_by_edit_request(self, request):

    self.set_blog(request)
    self.set_comment_author(request.user)
    meta = request.META
    self.parameters.update({'referrer': meta.get('HTTP_REFERER', ''), 'user_agent': meta.get('HTTP_USER_AGENT', ''), 'user_ip': meta.get('REMOTE_ADDR', '')})
    for (key, value) in meta.items():
        if (not isinstance(value, string_types)):
            continue
        if key.startswith('HTTP_COOKIE'):
            continue
        if (key.startswith('HTTP_') or (key in SPAM_OTHER_HEADERS)):
            self.parameters[key] = value
