Skip to content

Commit c467ddc

Browse files
authored
Add files via upload
1 parent 11ba995 commit c467ddc

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

src/WebResponses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ void AsyncFileResponse::_setContentTypeFromPath(const String &path) {
642642
const char *dot = strrchr(cpath, '.');
643643

644644
if (!dot) {
645-
_contentType = T_text_plain;
645+
_contentType = T_application_octet_stream;
646646
return;
647647
}
648648

src/literals.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -127,31 +127,31 @@ static constexpr const char *T__woff = ".woff"; // WOFF: Font file. Legacy sup
127127
static constexpr const char *T__woff2 = ".woff2"; // WOFF2: Better compression. Compatible with all modern browsers.
128128
static constexpr const char *T__xml = ".xml"; // XML: Configuration and data files
129129
static constexpr const char *T_application_javascript = "application/javascript"; // Obsolete type for JavaScript
130-
static constexpr const char *T_application_json = "application/json";
131-
static constexpr const char *T_application_msgpack = "application/msgpack";
130+
static constexpr const char *T_application_json = "application/json";
131+
static constexpr const char *T_application_msgpack = "application/msgpack";
132132
static constexpr const char *T_application_octet_stream = "application/octet-stream";
133-
static constexpr const char *T_application_pdf = "application/pdf";
133+
static constexpr const char *T_application_pdf = "application/pdf";
134134
static constexpr const char *T_app_xform_urlencoded = "application/x-www-form-urlencoded";
135135
static constexpr const char *T_audio_opus = "audio/opus";
136-
static constexpr const char *T_font_ttf = "font/ttf";
137-
static constexpr const char *T_font_woff = "font/woff";
138-
static constexpr const char *T_font_woff2 = "font/woff2";
139-
static constexpr const char *T_image_avif = "image/avif";
140-
static constexpr const char *T_image_gif = "image/gif";
141-
static constexpr const char *T_image_jpeg = "image/jpeg";
142-
static constexpr const char *T_image_png = "image/png";
143-
static constexpr const char *T_image_svg_xml = "image/svg+xml";
144-
static constexpr const char *T_image_webp = "image/webp";
145-
static constexpr const char *T_image_x_icon = "image/x-icon";
146-
static constexpr const char *T_text_css = "text/css";
147-
static constexpr const char *T_text_csv = "text/csv";
148-
static constexpr const char *T_text_event_stream = "text/event-stream";
149-
static constexpr const char *T_text_html = "text/html";
150-
static constexpr const char *T_text_javascript = "text/javascript";
151-
static constexpr const char *T_text_plain = "text/plain";
152-
static constexpr const char *T_text_xml = "text/xml";
153-
static constexpr const char *T_video_mp4 = "video/mp4";
154-
static constexpr const char *T_video_webm = "video/webm";
136+
static constexpr const char *T_font_ttf = "font/ttf";
137+
static constexpr const char *T_font_woff = "font/woff";
138+
static constexpr const char *T_font_woff2 = "font/woff2";
139+
static constexpr const char *T_image_avif = "image/avif";
140+
static constexpr const char *T_image_gif = "image/gif";
141+
static constexpr const char *T_image_jpeg = "image/jpeg";
142+
static constexpr const char *T_image_png = "image/png";
143+
static constexpr const char *T_image_svg_xml = "image/svg+xml";
144+
static constexpr const char *T_image_webp = "image/webp";
145+
static constexpr const char *T_image_x_icon = "image/x-icon";
146+
static constexpr const char *T_text_css = "text/css";
147+
static constexpr const char *T_text_csv = "text/csv";
148+
static constexpr const char *T_text_event_stream = "text/event-stream";
149+
static constexpr const char *T_text_html = "text/html";
150+
static constexpr const char *T_text_javascript = "text/javascript";
151+
static constexpr const char *T_text_plain = "text/plain";
152+
static constexpr const char *T_text_xml = "text/xml";
153+
static constexpr const char *T_video_mp4 = "video/mp4";
154+
static constexpr const char *T_video_webm = "video/webm";
155155

156156
// Response codes
157157
static constexpr const char *T_HTTP_CODE_100 = "Continue";

0 commit comments

Comments
 (0)