@@ -33,7 +33,7 @@ pub async fn auth_upload(data: web::Data<AppState>, id: web::Path<String>) -> Ht
3333
3434 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
3535 if pasta. id == intern_id {
36- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
36+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
3737 AuthPasta {
3838 args : & ARGS ,
3939 id : id. into_inner ( ) ,
@@ -49,7 +49,7 @@ pub async fn auth_upload(data: web::Data<AppState>, id: web::Path<String>) -> Ht
4949 }
5050
5151 HttpResponse :: Ok ( )
52- . content_type ( "text/html" )
52+ . content_type ( "text/html; charset=utf-8 " )
5353 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
5454}
5555
@@ -73,7 +73,7 @@ pub async fn auth_upload_with_status(
7373
7474 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
7575 if pasta. id == intern_id {
76- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
76+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
7777 AuthPasta {
7878 args : & ARGS ,
7979 id,
@@ -89,7 +89,7 @@ pub async fn auth_upload_with_status(
8989 }
9090
9191 HttpResponse :: Ok ( )
92- . content_type ( "text/html" )
92+ . content_type ( "text/html; charset=utf-8 " )
9393 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
9494}
9595
@@ -108,7 +108,7 @@ pub async fn auth_raw_pasta(data: web::Data<AppState>, id: web::Path<String>) ->
108108
109109 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
110110 if pasta. id == intern_id {
111- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
111+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
112112 AuthPasta {
113113 args : & ARGS ,
114114 id : id. into_inner ( ) ,
@@ -124,7 +124,7 @@ pub async fn auth_raw_pasta(data: web::Data<AppState>, id: web::Path<String>) ->
124124 }
125125
126126 HttpResponse :: Ok ( )
127- . content_type ( "text/html" )
127+ . content_type ( "text/html; charset=utf-8 " )
128128 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
129129}
130130
@@ -148,7 +148,7 @@ pub async fn auth_raw_pasta_with_status(
148148
149149 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
150150 if pasta. id == intern_id {
151- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
151+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
152152 AuthPasta {
153153 args : & ARGS ,
154154 id,
@@ -164,7 +164,7 @@ pub async fn auth_raw_pasta_with_status(
164164 }
165165
166166 HttpResponse :: Ok ( )
167- . content_type ( "text/html" )
167+ . content_type ( "text/html; charset=utf-8 " )
168168 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
169169}
170170
@@ -183,7 +183,7 @@ pub async fn auth_edit_private(data: web::Data<AppState>, id: web::Path<String>)
183183
184184 for ( _, pasta) in pastas. iter ( ) . enumerate ( ) {
185185 if pasta. id == intern_id {
186- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
186+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
187187 AuthPasta {
188188 args : & ARGS ,
189189 id : id. into_inner ( ) ,
@@ -199,7 +199,7 @@ pub async fn auth_edit_private(data: web::Data<AppState>, id: web::Path<String>)
199199 }
200200
201201 HttpResponse :: Ok ( )
202- . content_type ( "text/html" )
202+ . content_type ( "text/html; charset=utf-8 " )
203203 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
204204}
205205
@@ -223,7 +223,7 @@ pub async fn auth_edit_private_with_status(
223223
224224 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
225225 if pasta. id == intern_id {
226- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
226+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
227227 AuthPasta {
228228 args : & ARGS ,
229229 id,
@@ -239,7 +239,7 @@ pub async fn auth_edit_private_with_status(
239239 }
240240
241241 HttpResponse :: Ok ( )
242- . content_type ( "text/html" )
242+ . content_type ( "text/html; charset=utf-8 " )
243243 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
244244}
245245
@@ -258,7 +258,7 @@ pub async fn auth_file(data: web::Data<AppState>, id: web::Path<String>) -> Http
258258
259259 for ( _, pasta) in pastas. iter ( ) . enumerate ( ) {
260260 if pasta. id == intern_id {
261- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
261+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
262262 AuthPasta {
263263 args : & ARGS ,
264264 id : id. into_inner ( ) ,
@@ -274,7 +274,7 @@ pub async fn auth_file(data: web::Data<AppState>, id: web::Path<String>) -> Http
274274 }
275275
276276 HttpResponse :: Ok ( )
277- . content_type ( "text/html" )
277+ . content_type ( "text/html; charset=utf-8 " )
278278 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
279279}
280280
@@ -298,7 +298,7 @@ pub async fn auth_file_with_status(
298298
299299 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
300300 if pasta. id == intern_id {
301- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
301+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
302302 AuthPasta {
303303 args : & ARGS ,
304304 id,
@@ -314,7 +314,7 @@ pub async fn auth_file_with_status(
314314 }
315315
316316 HttpResponse :: Ok ( )
317- . content_type ( "text/html" )
317+ . content_type ( "text/html; charset=utf-8 " )
318318 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
319319}
320320
@@ -333,7 +333,7 @@ pub async fn auth_remove_private(data: web::Data<AppState>, id: web::Path<String
333333
334334 for ( _, pasta) in pastas. iter ( ) . enumerate ( ) {
335335 if pasta. id == intern_id {
336- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
336+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
337337 AuthPasta {
338338 args : & ARGS ,
339339 id : id. into_inner ( ) ,
@@ -349,7 +349,7 @@ pub async fn auth_remove_private(data: web::Data<AppState>, id: web::Path<String
349349 }
350350
351351 HttpResponse :: Ok ( )
352- . content_type ( "text/html" )
352+ . content_type ( "text/html; charset=utf-8 " )
353353 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
354354}
355355
@@ -373,7 +373,7 @@ pub async fn auth_remove_private_with_status(
373373
374374 for ( _i, pasta) in pastas. iter ( ) . enumerate ( ) {
375375 if pasta. id == intern_id {
376- return HttpResponse :: Ok ( ) . content_type ( "text/html" ) . body (
376+ return HttpResponse :: Ok ( ) . content_type ( "text/html; charset=utf-8 " ) . body (
377377 AuthPasta {
378378 args : & ARGS ,
379379 id,
@@ -389,6 +389,6 @@ pub async fn auth_remove_private_with_status(
389389 }
390390
391391 HttpResponse :: Ok ( )
392- . content_type ( "text/html" )
392+ . content_type ( "text/html; charset=utf-8 " )
393393 . body ( ErrorTemplate { args : & ARGS } . render ( ) . unwrap ( ) )
394394}
0 commit comments