def self.delete_object(url, token=nil, container=nil, name=nil, http_conn=nil, headers={}, proxy=nil)
if not http_conn
http_conn = http_connection(url)
end
parsed = http_conn[0].clone
conn = http_conn[1]
conn.start if !conn.started?
parsed.path += "/#{quote(container)}" if container
parsed.path += "/#{quote(name)}" if name
headers['x-auth-token'] = token if token
resp = conn.delete(parsed.request_uri, headers)
if resp.code.to_i < 200 or resp.code.to_i > 300
raise ClientException.new('Object DELETE failed', :http_scheme=>parsed.scheme,
:http_host=>conn.address, :http_port=>conn.port,
:http_path=>parsed.path, :http_status=>resp.code,
:http_reason=>resp.message)
end
end