From 732c13440ea4e1ff36dbcc2d5de41687bad6d7e5 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 11 Nov 2022 11:39:04 -0800 Subject: [PATCH] Use flasktools.atom_response. --- .../etiquette_flask/backend/endpoints/photo_endpoints.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py index 4ea5cf1..a3f67ca 100644 --- a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py +++ b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py @@ -483,14 +483,11 @@ def get_search_atom(): search = get_search_core() soup = etiquette.helpers.make_atom_feed( search.results, - feed_id=request.query_string.decode('utf-8'), + feed_id='/search' + request.query_string.decode('utf-8'), feed_title='etiquette search', feed_link=request.url.replace('/search.atom', '/search'), ) - outgoing_headers = { - 'Content-Type': 'application/atom+xml; charset=utf-8', - } - response = flask.Response(str(soup), headers=outgoing_headers) + response = flasktools.atom_response(soup) return response @site.route('/search.json')