def get_request_unique_id(http_response, prepend=None):
 uri_str = http_response.get_uri().url_string.encode('utf-8')
 body_str = http_response.body
 if isinstance(body_str, unicode):
  body_str = body_str.encode('utf-8', 'replace')
 _to_hash = (body_str + uri_str)
 hash_string = str(hash(_to_hash))
 hash_string += str(zlib.adler32(_to_hash))
 if prepend:
  hash_string = ('%s-%s' % (prepend, hash_string))
 return hash_string

def get_request_unique_id ( http_response , prepend = None ) : uri_str = http_response . get_uri ( ) . url_string . encode ( 'utf-8' ) body_str = http_response . body if isinstance ( body_str , unicode ) : body_str = body_str . encode ( 'utf-8' , 'replace' ) _to_hash = ( body_str + uri_str ) hash_string = str ( hash ( _to_hash ) ) hash_string += str ( zlib . adler32 ( _to_hash ) ) if prepend : hash_string = ( '%s-%s' % ( prepend , hash_string ) ) return hash_string
before i used md5 .