From 388ff0083720306068fe78057d14ec72b7db4e9a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 4 Jun 2025 14:34:46 +0100 Subject: [PATCH] Fix file extensions for serving File --- src/ahttpx/_content.py | 16 ++++++++-------- src/httpx/_content.py | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/ahttpx/_content.py b/src/ahttpx/_content.py index 78fd410..e75d30f 100644 --- a/src/ahttpx/_content.py +++ b/src/ahttpx/_content.py @@ -18,14 +18,14 @@ # https://github.com/nginx/nginx/blob/master/conf/mime.types _content_types = { - "json": "application/json", - "js": "application/javascript", - "html": "text/html", - "css": "text/css", - "png": "image/png", - "jpeg": "image/jpeg", - "jpg": "image/jpeg", - "gif": "image/gif", + ".json": "application/json", + ".js": "application/javascript", + ".html": "text/html", + ".css": "text/css", + ".png": "image/png", + ".jpeg": "image/jpeg", + ".jpg": "image/jpeg", + ".gif": "image/gif", } diff --git a/src/httpx/_content.py b/src/httpx/_content.py index c1ee4ad..1ee0ef2 100644 --- a/src/httpx/_content.py +++ b/src/httpx/_content.py @@ -18,14 +18,14 @@ # https://github.com/nginx/nginx/blob/master/conf/mime.types _content_types = { - "json": "application/json", - "js": "application/javascript", - "html": "text/html", - "css": "text/css", - "png": "image/png", - "jpeg": "image/jpeg", - "jpg": "image/jpeg", - "gif": "image/gif", + ".json": "application/json", + ".js": "application/javascript", + ".html": "text/html", + ".css": "text/css", + ".png": "image/png", + ".jpeg": "image/jpeg", + ".jpg": "image/jpeg", + ".gif": "image/gif", }