From e10fada695d36807347bc1aa0e9c30f61eefbaff Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Thu, 6 Jun 2019 23:05:17 +0300 Subject: [PATCH] updates for neffos and re-push the fix of the request path with uri unescaped codes Former-commit-id: fda1edb3e8dfc538da541070366f5f8f997bf367 --- context/context.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- websocket/websocket.go | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/context/context.go b/context/context.go index 46badde5..898fbf79 100644 --- a/context/context.go +++ b/context/context.go @@ -1473,7 +1473,7 @@ func DecodeURL(uri string) string { // based on the 'escape'. func (ctx *context) RequestPath(escape bool) string { if escape { - return DecodeQuery(ctx.request.URL.EscapedPath()) + return ctx.request.URL.EscapedPath() // DecodeQuery(ctx.request.URL.EscapedPath()) } return ctx.request.URL.Path // RawPath returns empty, requesturi can be used instead also. } diff --git a/go.mod b/go.mod index 9ac9c9f6..37d70dea 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/iris-contrib/go.uuid v2.0.0+incompatible github.com/json-iterator/go v1.1.6 github.com/kataras/golog v0.0.0-20180321173939-03be10146386 - github.com/kataras/neffos v0.0.0-20190603085547-9fba63259400 + github.com/kataras/neffos v0.0.0-20190606200227-c8dd500b4cdf github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d // indirect github.com/microcosm-cc/bluemonday v1.0.2 github.com/ryanuber/columnize v2.1.0+incompatible diff --git a/go.sum b/go.sum index cd8e9fa3..53c6e2db 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwK github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/kataras/golog v0.0.0-20180321173939-03be10146386 h1:VT6AeCHO/mc+VedKBMhoqb5eAK8B1i9F6nZl7EGlHvA= github.com/kataras/golog v0.0.0-20180321173939-03be10146386/go.mod h1:PcaEvfvhGsqwXZ6S3CgCbmjcp+4UDUh2MIfF2ZEul8M= -github.com/kataras/neffos v0.0.0-20190603085547-9fba63259400 h1:4Vmw9gER3G+QRYFP9Kt8KK01kwVfAE+EoXgiuCzn4oI= -github.com/kataras/neffos v0.0.0-20190603085547-9fba63259400/go.mod h1:XfxmcgJUtbPmzK9wPLE7ybFHXoCqZKGptaW1frrxFhw= +github.com/kataras/neffos v0.0.0-20190606200227-c8dd500b4cdf h1:rHFU6nupBNP5RejMwghFnhjUoOFXAYxmE07s4f5aeXQ= +github.com/kataras/neffos v0.0.0-20190606200227-c8dd500b4cdf/go.mod h1:XfxmcgJUtbPmzK9wPLE7ybFHXoCqZKGptaW1frrxFhw= github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d h1:V5Rs9ztEWdp58oayPq/ulmlqJJZeJP6pP79uP3qjcao= github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s= diff --git a/websocket/websocket.go b/websocket/websocket.go index 7d22a1cf..5b097cce 100644 --- a/websocket/websocket.go +++ b/websocket/websocket.go @@ -79,21 +79,21 @@ var ( // with the exact same incoming Message's Namespace (and Room if specified) // except its body which would be the given "body". Reply = neffos.Reply - // Object marshals the "v" value and returns a Message's Body. - // The "v" serialized value can be customized by implementing a `Marshal() ([]byte, error) ` method, + // Marshal marshals the "v" value and returns a Message's Body. + // The "v" value's serialized value can be customized by implementing a `Marshal() ([]byte, error) ` method, // otherwise the default one will be used instead ( see `SetDefaultMarshaler` and `SetDefaultUnmarshaler`). // Errors are pushed to the result, use the object's Marshal method to catch those when necessary. - Object = neffos.Object + Marshal = neffos.Marshal ) // SetDefaultMarshaler changes the default json marshaler. -// See `Object` package-level function and `Message.Object` method for more. +// See `Marshal` package-level function and `Message.Unmarshal` method for more. func SetDefaultMarshaler(fn func(v interface{}) ([]byte, error)) { neffos.DefaultMarshaler = fn } // SetDefaultUnmarshaler changes the default json unmarshaler. -// See `Object` package-level function and `Message.Object` method for more. +// See `Message.Unmarshal` method and package-level `Marshal` function for more. func SetDefaultUnmarshaler(fn func(data []byte, v interface{}) error) { neffos.DefaultUnmarshaler = fn }