force-restart-state #223

Merged
lash merged 13 commits from force-restart-state into master 2024-12-31 09:34:45 +01:00
Showing only changes of commit 5d8de80a18 - Show all commits

View File

@ -17,7 +17,6 @@ var (
type DefaultRequestParser struct { type DefaultRequestParser struct {
} }
func (rp *DefaultRequestParser) GetSessionId(rq any) (string, error) { func (rp *DefaultRequestParser) GetSessionId(rq any) (string, error) {
rqv, ok := rq.(*http.Request) rqv, ok := rq.(*http.Request)
if !ok { if !ok {
@ -57,12 +56,11 @@ func(f *SessionHandler) writeError(w http.ResponseWriter, code int, err error) {
s := err.Error() s := err.Error()
w.Header().Set("Content-Length", strconv.Itoa(len(s))) w.Header().Set("Content-Length", strconv.Itoa(len(s)))
w.WriteHeader(code) w.WriteHeader(code)
_, err = w.Write([]byte{}) _, err = w.Write([]byte(s))
if err != nil { if err != nil {
logg.Errorf("error writing error!!", "err", err, "olderr", s) logg.Errorf("error writing error!!", "err", err, "olderr", s)
w.WriteHeader(500) w.WriteHeader(500)
} }
return
} }
func (f *SessionHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { func (f *SessionHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {