Fork me on GitHub
#reitit
<
2018-10-29
>
valerauko00:10:17

shouldn't it be permanent redirect (308) though?

valerauko01:10:28

@ikitommi i added the handler as you suggested with the option @esuomi requested. if it's all right i'll add documentation (tests too?) for it

ikitommi16:10:25

@vale looks great! It's 307 in httprouter (https://godoc.org/github.com/julienschmidt/httprouter#Router.RedirectTrailingSlash) but I'm not an expert on http.

valerauko16:10:43

307-308 seem to be... in flux anyway so i'm not sure myself which is the right way

ikitommi16:10:55

oh, that says 301 for GET, 307 for others...

valerauko16:10:34

should i branch on that too or just make it 307? (it's 301-or-307 because of the POST->GET thing i think)

ikitommi16:10:07

let's use the httprouter way.

ikitommi16:10:37

> Support for status code 308 was added in Go 1.7

ikitommi16:10:07

how can these be language level features? 😮

valerauko17:10:43

i have no idea and that's honestly scary lol

juhoteperi16:10:21

Same way as javax.servlet API is ~language level feature

ccann17:10:08

is anyone working on / know of a duct module for reitit?

ikitommi17:10:40

don’t think so, but would be great to have that.

👍 4
ikitommi17:10:28

there is already things like middleware-registry, that could be read from duct config.

valerauko17:10:43

i have no idea and that's honestly scary lol

valerauko17:10:25

So in the end • use 302 for GET • use 308 otherwise Is this correct?

ikitommi17:10:38

@vale 301 & 308 (both permanent)

👍 4