def create_container(containername)
raise SyntaxException, "Container name cannot contain the characters '/' or '?'" if containername.match(/[\/\?]/)
raise SyntaxException, "Container name is limited to 256 characters" if containername.length > 256
response = cfreq("PUT",@storagehost,"#{@storagepath}/#{URI.encode(containername).gsub(/&/,'%26')}",@storageport,@storagescheme)
raise InvalidResponseException, "Unable to create container #{containername}" unless (response.code == "201" || response.code == "202")
CloudFiles::Container.new(self,containername)
end