'Processes cookies for a HTTP request.
@param request: request to process
@type request: urllib2.Request
@return: request
@rtype: urllib2.Request'

def http_request(self, request):

    COOKIE_HEADER_NAME = 'Cookie'
    tmp_request = Request_(request.get_full_url(), request.data, {}, request.origin_req_host, request.unverifiable)
    self.cookiejar.add_cookie_header(tmp_request)
    new_cookies = tmp_request.get_header(COOKIE_HEADER_NAME)
    if new_cookies:
        if request.has_header(COOKIE_HEADER_NAME):
            old_cookies = request.get_header(COOKIE_HEADER_NAME)
            merged_cookies = ';    '.join([old_cookies, new_cookies])
            request.add_unredirected_header(COOKIE_HEADER_NAME, merged_cookies)
        else:
            request.add_unredirected_header(COOKIE_HEADER_NAME, new_cookies)
    return request
