fix(ghost): Accept-Encoding gzip explícito en publish_draft y menú SEO
Build & Deploy ResearchOwl / build-and-push (push) Successful in 7s

Blindaje contra el default de aiohttp: si algún día se reinstala un
backend brotli, las sesiones sin Accept-Encoding volverían a anunciar
br y el decode roto de aiohttp 3.14 rompería la lectura de respuestas
de Ghost (duplicando drafts). Con el header fijado no puede regresar.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
ChemaVX
2026-07-04 20:19:50 +00:00
co-authored by Claude Fable 5
parent 397546a37a
commit 76c927f0d5
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -481,6 +481,11 @@ class GhostPublisher:
headers={
"Authorization": f"Ghost {token}",
"Accept-Version": "v5.0",
# Explícito para no heredar el default de aiohttp: si algún
# día se reinstala un backend brotli, el default anunciaría
# br y el decode roto de aiohttp 3.14 duplicaba drafts
# (fallo al leer la respuesta de un POST ya aceptado).
"Accept-Encoding": "gzip, deflate",
},
) as resp:
if resp.status not in (200, 201):
+4
View File
@@ -94,6 +94,10 @@ async def fetch_published_menu(lang: str) -> list[dict]:
headers={
"Authorization": f"Ghost {token}",
"Accept-Version": "v5.0",
# Explícito: sin esto, un backend brotli instalado haría
# que aiohttp anuncie br y su decode roto tumbe el menú
# ("using empty menu") — ver publish_draft.
"Accept-Encoding": "gzip, deflate",
},
) as resp:
if resp.status != 200: