def get_metadata_property(container, bucket_name, path, item): manager = container.metadata.manager data = manager.metadata.get(item) if None is data: response = response_map.create_404() else: response = response_map.create_200(data) return response
def format_response(response): response.headers["Cache-Control"] = "no-cache" if response.status_code == 404: response = response_map.create_404() if response.headers["Content-Type"] == "application/json": data = response.get_data() data += "\n" response.set_data(data) return response