Changeset 151 in code


Ignore:
Timestamp:
Mar 24, 2024, 10:42:12 PM (15 months ago)
Author:
Izuru Yakumo
Message:

キャッチ・アンド・リリース!

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

Location:
trunk
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG.md

    r149 r151  
     1# v0.2.4 - 2024.03.24
     2* Replace invalid favicon with one sourced from [here](https://en.touhouwiki.net/wiki/File:Th123YukariSigil.png), as well as using `//go:embed` for it
     3* Add rc.d files for FreeBSD and OpenBSD, respectively
     4
    15# v0.2.3 - 2024.03.21
    26* Document the configuration file format, which is INI-style (which is compatible to the old format in the codebase, though it's now called as `config.Config.<key>`)
  • trunk/cmd/yukari/main.go

    r149 r151  
    7777}
    7878
    79 var faviconBytes []byte
    8079var htmlFormExtension *template.Template
    8180var htmlBodyExtension *template.Template
     
    8887//go:embed templates/yukari_stop.html
    8988var htmlPageStop string
     89//go:embed favicon.ico
     90var faviconBytes []byte
    9091
    9192func init() {
    92         FaviconBase64 := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII"
    93 
    94         faviconBytes, _ = base64.StdEncoding.DecodeString(FaviconBase64)
    9593        var err error
    9694        htmlFormExtension, err = template.New("html_form_extension").Parse(
     
    388386        // server favicon.ico
    389387        if bytes.Equal(ctx.Path(), []byte("/favicon.ico")) {
    390                 ctx.SetContentType("image/png")
     388                ctx.SetContentType("image/vnd.microsoft.icon")
    391389                ctx.Write(faviconBytes)
    392390                return true
Note: See TracChangeset for help on using the changeset viewer.