mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
improve: 404 status code
This commit is contained in:
11
script/patch/gin-context.patch
Normal file
11
script/patch/gin-context.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
@@ -1073,6 +1073,10 @@
|
||||
// File writes the specified file into the body stream in an efficient way.
|
||||
func (c *Context) File(filepath string) {
|
||||
http.ServeFile(c.Writer, c.Request, filepath)
|
||||
+}
|
||||
+
|
||||
+func (c *Context) FileWithCustomStatusCode(filepath string, statusCode int) {
|
||||
+ http.ServeFileWithCustomStatusCode(c.Writer, c.Request, filepath, statusCode)
|
||||
}
|
||||
|
||||
// FileFromFS writes the specified file from http.FileSystem into the body stream in an efficient way.
|
||||
Reference in New Issue
Block a user