Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
99dbac8a
Commit
99dbac8a
authored
3 years ago
by
gentlespoon
Committed by
Melledy
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add UTF8 charset in dispatch server HTML template.
parent
b1bd0a5a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java
+2
-2
2 additions, 2 deletions
.../java/emu/grasscutter/server/dispatch/DispatchServer.java
with
2 additions
and
2 deletions
src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java
+
2
−
2
View file @
99dbac8a
...
...
@@ -252,14 +252,14 @@ public final class DispatchServer {
else
config
.
enableCorsForAllOrigins
();
}
});
httpServer
.
get
(
"/"
,
(
req
,
res
)
->
res
.
send
(
translate
(
"messages.status.welcome"
)));
httpServer
.
get
(
"/"
,
(
req
,
res
)
->
res
.
send
(
"<!doctype html><html><head><meta charset=\"utf8\"></head><body>"
+
translate
(
"messages.status.welcome"
)
+
"</body></html>"
));
httpServer
.
raw
().
error
(
404
,
ctx
->
{
if
(
Grasscutter
.
getConfig
().
DebugMode
==
ServerDebugMode
.
MISSING
)
{
Grasscutter
.
getLogger
().
info
(
translate
(
"messages.dispatch.unhandled_request_error"
,
ctx
.
method
(),
ctx
.
url
()));
}
ctx
.
contentType
(
"text/html"
);
ctx
.
result
(
"<!doctype html><html
lang=\"en\"
><body><img src=\"https://http.cat/404\" /></body></html>"
);
// I'm like 70% sure this won't break anything.
ctx
.
result
(
"<!doctype html><html
><head><meta charset=\"utf8\"></head
><body><img src=\"https://http.cat/404\" /></body></html>"
);
// I'm like 70% sure this won't break anything.
});
// Authentication Handler
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment