diff options
| -rw-r--r-- | environment_test.go | 4 | ||||
| -rw-r--r-- | go.mod | 8 | ||||
| -rw-r--r-- | go.sum | 42 | ||||
| -rw-r--r-- | httpd.go | 150 | ||||
| -rw-r--r-- | memfs_generate.go | 4 |
5 files changed, 60 insertions, 148 deletions
diff --git a/environment_test.go b/environment_test.go index 19fd80c..985df1d 100644 --- a/environment_test.go +++ b/environment_test.go @@ -48,10 +48,10 @@ parent = https://kilabit.info/dns-query err := ini.Unmarshal([]byte(c.content), got) if err != nil { - test.Assert(t, "error", c.expError, err.Error(), true) + test.Assert(t, "error", c.expError, err.Error()) continue } - test.Assert(t, "environment", c.exp, got, true) + test.Assert(t, "environment", c.exp, got) } } @@ -1,11 +1,7 @@ module github.com/shuLhan/rescached-go/v4 -go 1.14 +go 1.16 -require ( - github.com/shuLhan/share v0.22.1-0.20210124101421-f76dc891e371 - golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect - golang.org/x/sys v0.0.0-20210123111255-9b0068b26619 // indirect -) +require github.com/shuLhan/share v0.28.0 //replace github.com/shuLhan/share => ../share @@ -1,34 +1,16 @@ -git.sr.ht/~shulhan/asciidoctor-go v0.0.0-20201205130914-be765f32b57b/go.mod h1:ejaxKeBMNL5EpP2zjRP4B8zuOr+MM4ZyGwE3y7807WI= -git.sr.ht/~shulhan/asciidoctor-go v0.0.0-20201226102329-36285ff15434/go.mod h1:ejaxKeBMNL5EpP2zjRP4B8zuOr+MM4ZyGwE3y7807WI= -git.sr.ht/~shulhan/ciigo v0.3.0/go.mod h1:Y5FvSiJg88qshoR1ktj4fLzM5sk1pZcV0kJGU8GAuTo= -git.sr.ht/~shulhan/ciigo v0.3.1-0.20210109200358-c23bd42ef521/go.mod h1:DLyaapVphRtqry80iqw+luWAKepHtbDmbvxqFmulcko= -github.com/shuLhan/share v0.20.2-0.20201122173411-e8b3bf5ee6e9/go.mod h1:oBv+CGHG6u4Sa71+nJJJji8mCgPAadywjsB3I3k/b0o= -github.com/shuLhan/share v0.20.2-0.20201205202022-66069b9e49fe/go.mod h1:oBv+CGHG6u4Sa71+nJJJji8mCgPAadywjsB3I3k/b0o= -github.com/shuLhan/share v0.22.1-0.20210109185915-0490a19341d9/go.mod h1:u9caerexlcxmPVDttj7PnkxCBDY6yBRTZ+gGR+1tO98= -github.com/shuLhan/share v0.22.1-0.20210124101421-f76dc891e371 h1:5UPgRXvrL9YmiydMG72xJYE8LuYS1EcjZQrBqhSX064= -github.com/shuLhan/share v0.22.1-0.20210124101421-f76dc891e371/go.mod h1:y4+p5vUmKNNhMMhU6yGgE6QxTgJxA4nv6OOq+cIf7wU= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +github.com/shuLhan/share v0.28.0 h1:I/iN/GtPzb9qzbRAiqZvyeiSF9dSpqAv3DviVTPffqo= +github.com/shuLhan/share v0.28.0/go.mod h1:mIi+vy+p2UOGZXna5Z9JDr0t8pxyl2ysJCTw/zZECAY= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210108172913-0df2131ae363/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210123111255-9b0068b26619 h1:yLLDsUUPDliIQpKl7BjVb1igwngIMH2GBjo1VpwLTE0= -golang.org/x/sys v0.0.0-20210123111255-9b0068b26619/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -65,11 +65,13 @@ func (srv *Server) httpdInit() (err error) { }, Memfs: memFS, Address: srv.env.WUIListen, - CORSAllowOrigins: []string{ - "http://127.0.0.1:5000", - }, - CORSAllowHeaders: []string{ - libhttp.HeaderContentType, + CORS: libhttp.CORSOptions{ + AllowOrigins: []string{ + "http://127.0.0.1:5000", + }, + AllowHeaders: []string{ + libhttp.HeaderContentType, + }, }, } @@ -275,11 +277,7 @@ func (srv *Server) httpdRun() { } } -func (srv *Server) apiCaches( - _ http.ResponseWriter, req *http.Request, _ []byte, -) ( - resBody []byte, err error, -) { +func (srv *Server) apiCaches(epr *libhttp.EndpointRequest) (resBody []byte, err error) { res := response{} res.Code = http.StatusOK answers := srv.dns.CachesLRU() @@ -291,18 +289,14 @@ func (srv *Server) apiCaches( return json.Marshal(res) } -func (srv *Server) apiCachesSearch( - _ http.ResponseWriter, req *http.Request, _ []byte, -) ( - resBody []byte, err error, -) { +func (srv *Server) apiCachesSearch(epr *libhttp.EndpointRequest) (resBody []byte, err error) { res := response{ E: liberrors.E{ Code: http.StatusInternalServerError, }, } - q := req.Form.Get(paramNameQuery) + q := epr.HttpRequest.Form.Get(paramNameQuery) if len(q) == 0 { res.Code = http.StatusOK @@ -327,16 +321,12 @@ func (srv *Server) apiCachesSearch( return json.Marshal(res) } -func (srv *Server) httpdAPIDeleteCaches( - _ http.ResponseWriter, req *http.Request, _ []byte, -) ( - resBody []byte, err error, -) { +func (srv *Server) httpdAPIDeleteCaches(epr *libhttp.EndpointRequest) (resBody []byte, err error) { res := &liberrors.E{ Code: http.StatusInternalServerError, } - q := req.Form.Get(paramNameName) + q := epr.HttpRequest.Form.Get(paramNameName) if len(q) == 0 { res.Message = "empty query 'name' parameter" return nil, res @@ -350,11 +340,7 @@ func (srv *Server) httpdAPIDeleteCaches( return json.Marshal(res) } -func (srv *Server) httpdAPIGetEnvironment( - httpRes http.ResponseWriter, req *http.Request, reqBody []byte, -) ( - resBody []byte, err error, -) { +func (srv *Server) httpdAPIGetEnvironment(epr *libhttp.EndpointRequest) (resBody []byte, err error) { res := &response{} res.Code = http.StatusOK res.Data = srv.env @@ -362,11 +348,7 @@ func (srv *Server) httpdAPIGetEnvironment( return json.Marshal(res) } -func (srv *Server) httpdAPIPostEnvironment( - httpRes http.ResponseWriter, req *http.Request, reqBody []byte, -) ( - resBody []byte, err error, -) { +func (srv *Server) httpdAPIPostEnvironment(epr *libhttp.EndpointRequest) (resBody []byte, err error) { res := &response{ E: liberrors.E{ Code: http.StatusOK, @@ -375,7 +357,7 @@ func (srv *Server) httpdAPIPostEnvironment( } newOpts := new(environment) - err = json.Unmarshal(reqBody, newOpts) + err = json.Unmarshal(epr.RequestBody, newOpts) if err != nil { return nil, err } @@ -419,14 +401,10 @@ func (srv *Server) httpdAPIPostEnvironment( // If its status changes to disabled, remove the hosts from caches, hide it, // and remove it from list of HostsFiles. // -func (srv *Server) apiHostsBlockUpdate( - httpRes http.ResponseWriter, req *http.Request, reqBody []byte, -) ( - resBody []byte, err error, -) { +func (srv *Server) apiHostsBlockUpdate(epr *libhttp.EndpointRequest) (resBody []byte, err error) { hostsBlocks := make([]*hostsBlock, 0) - err = json.Unmarshal(reqBody, &hostsBlocks) + err = json.Unmarshal(epr.RequestBody, &hostsBlocks) if err != nil { return nil, err } @@ -529,14 +507,10 @@ func (srv *Server) hostsBlockDisable(hb *hostsBlock) (err error) { return nil } -func (srv *Server) apiHostsFileCreate( - httpres http.ResponseWriter, httpreq *http.Request, _ []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiHostsFileCreate(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} - name := httpreq.Form.Get(paramNameName) + name := epr.HttpRequest.Form.Get(paramNameName) if len(name) == 0 { res.Code = http.StatusBadRequest res.Message = "hosts file name is invalid or empty" @@ -561,14 +535,10 @@ func (srv *Server) apiHostsFileCreate( return json.Marshal(res) } -func (srv *Server) apiHostsFileGet( - _ http.ResponseWriter, httpreq *http.Request, _ []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiHostsFileGet(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} - name := httpreq.Form.Get(paramNameName) + name := epr.HttpRequest.Form.Get(paramNameName) hf, found := srv.env.HostsFiles[name] if !found { @@ -586,14 +556,10 @@ func (srv *Server) apiHostsFileGet( return json.Marshal(res) } -func (srv *Server) apiHostsFileDelete( - _ http.ResponseWriter, httpreq *http.Request, reqbody []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiHostsFileDelete(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} - name := httpreq.Form.Get(paramNameName) + name := epr.HttpRequest.Form.Get(paramNameName) if len(name) == 0 { res.Code = http.StatusBadRequest res.Message = "empty or invalid host file name" @@ -627,15 +593,11 @@ func (srv *Server) apiHostsFileDelete( // // apiHostsFileRRCreate create new record and save it to the hosts file. // -func (srv *Server) apiHostsFileRRCreate( - _ http.ResponseWriter, httpreq *http.Request, _ []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiHostsFileRRCreate(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} res.Code = http.StatusBadRequest - hostsFileName := httpreq.Form.Get(paramNameName) + hostsFileName := epr.HttpRequest.Form.Get(paramNameName) if len(hostsFileName) == 0 { res.Message = "empty hosts file name in request path" return nil, res @@ -651,12 +613,12 @@ func (srv *Server) apiHostsFileRRCreate( Class: dns.QueryClassIN, } - rr.Name = httpreq.Form.Get(paramNameDomain) + rr.Name = epr.HttpRequest.Form.Get(paramNameDomain) if len(rr.Name) == 0 { res.Message = "empty 'domain' query parameter" return nil, res } - v := httpreq.Form.Get(paramNameValue) + v := epr.HttpRequest.Form.Get(paramNameValue) if len(v) == 0 { res.Message = "empty 'value' query parameter" return nil, res @@ -688,16 +650,12 @@ func (srv *Server) apiHostsFileRRCreate( return json.Marshal(res) } -func (srv *Server) apiHostsFileRRDelete( - _ http.ResponseWriter, httpreq *http.Request, reqbody []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiHostsFileRRDelete(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &liberrors.E{ Code: http.StatusBadRequest, } - hostsFileName := httpreq.Form.Get(paramNameName) + hostsFileName := epr.HttpRequest.Form.Get(paramNameName) if len(hostsFileName) == 0 { res.Message = "empty hosts file name in request path" return nil, res @@ -709,7 +667,7 @@ func (srv *Server) apiHostsFileRRDelete( return nil, res } - domainName := httpreq.Form.Get(paramNameDomain) + domainName := epr.HttpRequest.Form.Get(paramNameDomain) if len(domainName) == 0 { res.Message = "empty 'domain' query parameter" return nil, res @@ -735,17 +693,11 @@ func (srv *Server) apiHostsFileRRDelete( return json.Marshal(res) } -func (srv *Server) apiZoneFileCreate( - _ http.ResponseWriter, - httpreq *http.Request, - reqbody []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiZoneFileCreate(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} res.Code = http.StatusBadRequest - zoneName := httpreq.Form.Get(paramNameName) + zoneName := epr.HttpRequest.Form.Get(paramNameName) if len(zoneName) == 0 { res.Message = "empty or invalid zone file name" return nil, res @@ -780,17 +732,11 @@ func (srv *Server) apiZoneFileCreate( return json.Marshal(res) } -func (srv *Server) apiZoneFileDelete( - _ http.ResponseWriter, - httpreq *http.Request, - reqbody []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiZoneFileDelete(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} res.Code = http.StatusBadRequest - zoneName := httpreq.Form.Get(paramNameName) + zoneName := epr.HttpRequest.Form.Get(paramNameName) if len(zoneName) == 0 { res.Message = "empty or invalid zone file name" return nil, res @@ -826,17 +772,11 @@ func (srv *Server) apiZoneFileDelete( // // apiZoneFileRRCreate create new RR for the zone file. // -func (srv *Server) apiZoneFileRRCreate( - _ http.ResponseWriter, - httpreq *http.Request, - reqbody []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiZoneFileRRCreate(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} res.Code = http.StatusBadRequest - zoneFileName := httpreq.Form.Get(paramNameName) + zoneFileName := epr.HttpRequest.Form.Get(paramNameName) if len(zoneFileName) == 0 { res.Message = "empty or invalid zone file name" return nil, res @@ -848,7 +788,7 @@ func (srv *Server) apiZoneFileRRCreate( return nil, res } - rrTypeValue := httpreq.Form.Get(paramNameType) + rrTypeValue := epr.HttpRequest.Form.Get(paramNameType) rrType, err := strconv.Atoi(rrTypeValue) if err != nil { res.Message = fmt.Sprintf("invalid or empty RR type %q: %s", @@ -863,7 +803,7 @@ func (srv *Server) apiZoneFileRRCreate( case dns.QueryTypeMX: rr.Value = &dns.RDataMX{} } - err = json.Unmarshal(reqbody, rr) + err = json.Unmarshal(epr.RequestBody, rr) if err != nil { res.Message = "json.Unmarshal:" + err.Error() return nil, res @@ -920,17 +860,11 @@ func (srv *Server) apiZoneFileRRCreate( // // apiZoneFileRRDelete delete RR from the zone file. // -func (srv *Server) apiZoneFileRRDelete( - _ http.ResponseWriter, - httpreq *http.Request, - reqbody []byte, -) ( - resbody []byte, err error, -) { +func (srv *Server) apiZoneFileRRDelete(epr *libhttp.EndpointRequest) (resbody []byte, err error) { res := &response{} res.Code = http.StatusBadRequest - zoneFileName := httpreq.Form.Get(paramNameName) + zoneFileName := epr.HttpRequest.Form.Get(paramNameName) if len(zoneFileName) == 0 { res.Message = "empty zone file name" return nil, res @@ -942,7 +876,7 @@ func (srv *Server) apiZoneFileRRDelete( return nil, res } - v := httpreq.Form.Get(paramNameType) + v := epr.HttpRequest.Form.Get(paramNameType) rrType, err := strconv.Atoi(v) if err != nil { res.Message = fmt.Sprintf("invalid or empty param type %s: %s", @@ -957,7 +891,7 @@ func (srv *Server) apiZoneFileRRDelete( case dns.QueryTypeMX: rr.Value = &dns.RDataMX{} } - err = json.Unmarshal(reqbody, &rr) + err = json.Unmarshal(epr.RequestBody, &rr) if err != nil { res.Message = "json.Unmarshal:" + err.Error() return nil, res diff --git a/memfs_generate.go b/memfs_generate.go index bb95ca2..aed1a68 100644 --- a/memfs_generate.go +++ b/memfs_generate.go @@ -158,7 +158,7 @@ func generate__www_index_js() *memfs.Node { node := &memfs.Node{ SysPath: "_www/index.js", Path: "/index.js", - ContentType: "application/javascript", + ContentType: "text/javascript; charset=utf-8", ContentEncoding: "gzip", V: []byte("\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\xFF\x74\x90\x31\x6B\xFB\x30\x10\xC5\x67\xDD\xA7\x10\x9A\x64\x08\xC6\xCB\x7F\xF4\xF2\x2F\x81\x06\xD2\x4C\xD9\x4A\x07\xD7\x3A\xBB\xA2\xE7\x53\x90\x94\x40\x28\xFE\xEE\x45\x92\x49\xEB\xB6\xD9\x84\xDE\xEF\xDD\xBD\x7B\xC3\x99\xFB\x68\x1D\x4B\x76\xD1\x0E\x5B\xEF\x9D\xD7\x53\x18\x2B\xF9\x01\xC2\xD8\x70\xA2\xEE\x7A\x48\x8A\x56\x98\x34\xB5\x91\x49\x85\x19\x60\xED\xDC\xF1\xE0\xEE\x18\x2D\x0F\xEE\x2F\xDF\x8A\xEA\xA9\x0B\xE1\xD0\x4D\x58\xC0\x34\x85\x30\x96\xD9\xB2\x95\xC6\xF5\xE7\x09\x39\xD6\x23\xC6\x2D\x61\x7A\xFE\xBF\xEE\x8C\x56\x19\x50\x55\xA1\x91\xBE\xA3\xBD\xC7\x2E\xE2\x42\x6B\x65\xEC\x25\x71\x48\x75\xDE\xB5\xB7\x21\xD6\x9D\x31\x5F\x9B\x8B\x68\x99\xD1\x3F\x1E\x9F\xF6\xB2\x4D\x49\x40\xE4\x0D\x75\x77\x3A\x21\x9B\x87\x37\x4B\x46\x23\x55\x00\x22\x60\x3C\xDA\x09\xDD\x39\xEA\xDB\x49\x3A\x07\x5F\x2C\x1E\x27\x77\xC1\x62\x29\x3F\x7D\x7A\x7B\xE4\xE7\xE6\xA5\x02\x31\x6F\xE4\xBF\xA6\x69\xD6\xA5\x44\x37\x8E\x84\xB9\x4D\x6B\x6E\x35\xAC\x0F\xFB\xD1\x81\x35\x15\x08\x3B\x48\x8D\x54\x87\x78\x25\xAC\x97\x66\x65\xDB\xB6\x52\xB1\x63\x54\x25\xD7\x6F\x40\xAA\x57\x72\xFD\xBB\x02\x31\x4B\xA4\x80\x77\xB1\x3C\x05\xC4\x0C\x33\x7C\x06\x00\x00\xFF\xFF\x40\xB4\x37\x6E\x33\x02\x00\x00"), } @@ -172,7 +172,7 @@ func generate__www_rescached_js() *memfs.Node { node := &memfs.Node{ SysPath: "_www/rescached.js", Path: "/rescached.js", - ContentType: "application/javascript", + ContentType: "text/javascript; charset=utf-8", ContentEncoding: "gzip", V: []byte("\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\xFF\xD4\x57\x6B\x6F\xDB\x36\x17\xFE\x2C\xFD\x0A\xBE\xFA\x24\xBF\x71\xE5\xA4\xDD\xBA\xCD\x9D\x51\xB8\x49\xDA\x6E\x4B\xE3\xC0\x76\xB7\x62\x41\x30\xB0\xD2\xB1\xA5\x5A\x21\x35\x92\x76\xE3\x14\xFE\xEF\xC3\x21\x75\xA1\x64\xA5\x71\xDA\x74\xED\x0A\xD4\x21\xA9\xC3\x73\x7B\xCE\x8D\x21\x67\x52\x91\xF1\x78\xBA\xCE\x40\x92\x01\xF9\xE0\x3A\x07\x7D\xE2\x0D\xBD\xAE\xEB\x3C\xEC\x13\xEF\x74\x82\xAB\x47\x7D\xE2\xBD\x3A\xC2\xD5\x77\xB8\x7A\x8E\xAB\xEF\xFB\xC4\x3B\x3C\x1D\xBE\x3A\xC6\xCD\xE3\x3E\xF1\x26\x23\x7D\xEB\x07\xA4\x78\x86\xAB\x1F\x71\xF5\x02\x57\x3F\xE1\x6A\x8C\xAB\x83\x7D\x64\xFA\xFA\xE4\x44\x6F\x50\xD4\x1F\xBF\x69\x11\x07\x28\xED\x6C\x6A\x88\x50\xDE\xCB\x5F\x4E\x9F\x8F\xF4\x4E\xCB\x2C\x77\x28\xF7\xD5\x1B\xBD\x44\xA9\xD3\x37\x53\xAD\x2B\x0A\x1B\x0E\x87\x5A\x85\x47\x78\x7F\x32\xFE\x5D\x2B\x8C\x32\x46\x67\x48\xB4\x71\xDD\xD9\x92\x85\x2A\xE1\x8C\xCC\x41\x19\xA3\x4F\xE9\x25\xF8\x8B\x0E\x1A\x9E\x82\x22\x2B\x32\x28\xBC\x71\xBE\xB8\x70\x9D\x64\x46\xFC\x15\x19\x0C\x06\xC4\xF3\x34\x91\x23\x40\x2D\x05\x23\x0B\xD7\xD9\xB8\xC5\x66\x85\xBC\xC3\x94\x4A\x49\xC6\x20\x43\x1A\xC6\x10\x21\xB1\x54\x54\x25\x21\x61\x94\xF1\x09\x84\x9C\x45\xE8\xE2\x83\xFD\xE2\x5F\x49\x40\xB3\xE4\x10\x2F\xE1\x67\xAF\x47\xB3\xA4\xA7\x79\x48\x6F\x9B\x62\x02\x54\x84\x71\x83\xAE\x27\xF5\x69\x8D\xFC\x25\x97\x4A\x46\x25\x61\x8C\xDB\x20\xEA\xD5\x68\xFE\xE4\x0C\x2A\x92\x6B\xCE\x40\x53\xB8\x8E\x0E\x0B\xB1\x0C\x15\x17\xBE\x04\xB1\x02\x61\x8C\x57\x71\x22\x03\x73\x40\x06\xC4\x2C\x8A\x63\x60\xE8\xBC\x0F\x1B\x74\x8C\xEB\x50\xB9\x66\x21\x31\x3A\xFB\xE6\xB2\x89\x35\xA1\xAD\xA4\xEF\x69\xA2\xC8\x0C\x54\x18\xFB\x36\xD3\xBD\xCA\x81\x41\x69\x73\x57\x5F\x77\x62\xA0\x11\x08\xD9\x37\x3B\xE7\x90\x33\x06\x1A\xCD\x3E\xF1\x16\x00\xD9\x03\x9A\x26\x2B\x40\xD0\x1D\x67\x83\xBF\x9B\x4E\x85\x97\x11\x28\x40\x06\xEF\x24\x67\x7E\xC7\xD6\xD2\xF8\xD4\xFF\x7B\x09\x62\x5D\xA9\xCA\x53\x08\x52\x3E\xF7\x3D\xF3\xB9\x4F\xBC\x2E\x31\x24\x1F\xB1\x05\x65\xD7\xEC\xD1\xAA\xB6\xD8\x94\xE3\x68\xBE\x7B\x4F\x35\xE3\x81\x97\xEF\xF5\x0E\x2D\xD8\xD1\x00\x8D\xF5\xF3\x24\x85\x43\x01\x54\x81\xCF\xE8\x25\xD8\x3E\x8F\x95\xCA\xC6\xB7\xEB\x5A\xF7\x7D\x1E\x40\x7B\x04\xB9\x69\xA7\x1A\xBF\x5F\x82\x8A\x79\x84\xD9\xFA\x7A\x6A\x39\x1B\x55\xC5\x0C\xB2\x7D\x92\xCB\x2D\x35\xD6\xE9\x84\x26\x84\x3C\x02\x9D\x55\x0F\xF7\xF7\x8D\xA2\x65\x0C\x05\xA5\x31\xF2\x1C\x25\x5F\x98\xAA\xE4\x38\x0E\xA6\x6A\xBF\xD2\xC6\x19\x43\xC8\x45\x24\xFB\xE4\xFC\xC2\xA8\xE1\x9A\xFF\xB9\xC3\x04\x48\xDB\x47\x73\x50\xC7\x6C\x95\x08\xCE\x2E\x81\x29\xFF\x76\xF7\xD4\x5D\x63\x52\x04\x2A\x0E\x5E\x7B\x18\x34\x4C\xCE\x6D\x2E\x4E\x31\xF5\x96\xB2\x61\x39\x3A\x24\xA2\x8A\x06\x67\x62\xC9\xE0\x08\x52\xBA\x26\x03\x6D\x61\xDB\x97\x9E\x85\x92\x55\x58\xB6\x19\x4D\x63\x01\x32\xE6\x69\xD4\xCA\xAC\xFA\xDA\x6B\x84\xA8\xCD\x14\x3F\xCD\xB8\x20\x3E\x22\xBB\x20\x89\xF6\xAA\xE1\x52\xC1\x94\x9B\xA1\x0D\xFD\x5F\xCB\xF7\x20\xA6\x72\xF4\x9E\x9D\x09\x9E\x81\x50\x6B\x7F\xD1\x29\x6E\xA0\xFF\x54\xC2\x96\xA0\x77\x1B\xFD\x8B\x92\xE2\x19\x19\xB4\x49\xD2\x25\x39\x97\xA4\xD6\x19\xF0\x19\x89\x67\x41\x1E\x07\xA6\x4A\x2F\x59\x04\xB3\x84\x41\xE4\x95\x42\x6C\x12\x72\x7E\x51\xC9\xDA\xD8\x71\x67\x49\xBC\x21\x8E\x5E\xB4\xF4\x8C\xD6\xA6\xD1\xD2\x35\xAC\xB6\x61\xF3\x5E\xB5\x66\xF1\x11\xA4\xF0\xAF\x65\xF1\xD1\xF1\xC9\xF1\xF4\xB8\x91\xC8\xB7\xC6\xF5\x0E\x61\x1D\x69\x2B\xC8\x8D\x79\xFD\xD1\x6C\x2D\x89\x5F\x80\xFA\x42\x8E\xD8\xB9\x60\x15\x87\x93\x36\x2B\x3F\xA3\x6C\x15\xE1\xB6\x43\xF1\x2A\x99\x9B\xCB\xC3\x28\xF2\xE3\xE2\xA8\x4B\x22\x7E\x49\x13\xD6\x25\x2B\x9A\x2E\xA1\x0A\xCB\x8C\x0A\x7A\x89\xB6\x31\x78\x4F\x5E\x8F\x4F\x4C\xCB\x39\xD3\xA7\xDA\x38\x43\x10\x48\x50\xBE\x67\x78\x78\x05\xB3\xE6\x67\xCD\xDA\x2B\x44\xB8\x25\x14\x34\x4B\x4C\x79\xD9\x6A\x7A\xAD\xCE\xD7\x6D\xBC\x50\xDC\x6C\xBD\x9E\x10\x79\xDF\xF3\x9E\xE6\x8B\x5C\xB2\xE2\x13\x25\x12\x36\xF7\x2D\x81\xED\xD8\xD3\x2C\xC9\x87\x84\xAA\x3B\x8D\x26\xA6\x3D\x6D\x3E\x21\xA0\x5B\xA1\x2E\x2B\x53\x1B\xE6\xA5\x55\xBA\xBE\x54\x25\x27\xC8\x96\x32\xF6\x0B\xA8\x3B\x77\x41\x39\x2F\x03\x5B\x40\xDF\x17\xC2\xFF\x01\x10\xAD\xE2\xF4\x35\x60\x2C\x5B\xDF\x15\x19\x90\xFD\x27\xE4\x8A\xFC\x6C\x35\x9C\x20\x05\x36\x57\xF1\x13\x72\xB5\xB7\x67\xF7\xC0\x8A\xE2\xFC\xEA\x22\xC0\xF4\xD7\x1A\xD8\xE0\xD5\x43\x44\x66\x69\x12\x82\x7F\xD5\x25\x07\x9D\x7A\x77\xBA\x39\x56\x96\x59\x44\x15\x6C\x4F\x34\xA8\xED\x9C\x2B\x33\x89\xBB\x8E\x33\x7A\xFB\x0E\x42\x15\x50\x29\x93\x39\xF3\xE7\x5C\x75\x4B\xBB\x35\x20\x73\xAE\x6A\x73\x07\x69\x1C\xFC\xDF\x90\xD7\x27\x8D\x92\xC6\x9A\x31\x48\xCB\x61\xCB\xE5\x3B\x17\xF1\xED\xC1\xAB\x75\x16\x2D\xB2\x7D\xEB\x99\xE0\x78\x87\x9C\x29\x60\xEA\x01\x36\x68\xAF\x4F\x3C\x9A\xA1\xBF\x29\xBE\x1C\x7A\x18\x36\xF9\xBD\x8D\xF9\xF3\x96\x47\xEB\x3E\xF9\x75\x32\x3A\x0D\xA4\x0E\xDC\x64\xB6\x46\xBF\x75\xEC\x0E\xD9\x1C\xCB\x9B\x51\xD8\xC4\x49\x47\xD8\xB3\x94\x87\x0B\x69\xF2\xD9\xAC\x3F\xA5\xA9\x59\xCF\xB9\xBF\xDE\x22\x97\xAF\xE1\x0F\xDB\x86\xFA\xE4\xB0\xA3\x5B\xF0\xE5\x79\xDF\x0F\x16\xF3\x9A\xFD\x92\xEF\x95\xB6\xBE\x5F\x58\x52\xB5\xFD\x5B\xC6\xC8\xBA\x03\xEE\x73\xD6\xBB\xCD\x01\xAD\xA3\xDE\x67\xF8\xA0\x39\xE1\x35\x5C\xB1\x93\xFD\xA6\x06\x5A\x61\xD0\x25\x42\x54\xA5\x6C\xC7\xD6\x94\x5B\x8E\xE7\xC8\xA3\x6A\x4A\xBD\xBC\x19\x09\x11\x60\xB8\x7F\xC6\x18\xD1\xCC\xA3\x1D\xD3\xC8\x64\x51\x6B\x12\x09\xD1\x29\x1B\xDB\x9D\x06\xD1\xD6\x71\x1B\x39\x5C\xD7\xDA\xDA\x36\x1C\x06\x4B\xE3\x0A\x84\xF2\x71\xD1\x8D\x7A\x3D\x32\x19\x0D\x03\xBD\xBE\x9E\x05\x93\xD1\xB0\x1E\xC7\xCE\x86\x40\x2A\x21\xA7\xBE\xB6\x1F\x54\x35\xAA\x3B\x40\x6E\x05\xFE\x37\x06\xB9\x9D\x26\xDF\x38\xE8\x37\x61\xDD\x8E\xCF\x36\x34\x1B\xF7\x9F\x00\x00\x00\xFF\xFF\x8F\xB7\xF9\x8C\x01\x16\x00\x00"), } |
