Comments (3)
Hi @alex-rufo and @Dot-H,
I've been release v1.1.2 that's fix the issue.
Thanks!
from router.
Hi @alex-rufo ,
Well seen!
I fount the error, so i will fix it soon.
Thanks.
from router.
Hey 👋
I think I spotted a related issue. Using a custom OPTIONS
handler with catch-all parameters always leads to 308
. This happens only since 1.1.0
.
I adapted @alex-rufo 's code to be able to reproduce:
package main
import (
"log"
"github.com/fasthttp/router"
"github.com/valyala/fasthttp"
)
func Catchall(ctx *fasthttp.RequestCtx) {
ctx.WriteString("Catchall!")
}
func Specific(ctx *fasthttp.RequestCtx) {
ctx.WriteString("Specific!")
}
func main() {
r := router.New()
r.HandleOPTIONS = false
r.OPTIONS("/{path:*}", Catchall)
r.POST("/specific/", Specific)
log.Fatal(fasthttp.ListenAndServe(":8080", r.Handler))
}
Before, calling
curl -v -X OPTIONS 'localhost:8080/specific/'
would lead to 200
and Catchall!
being printed.
For 1.1.1
and 1.1.0
, the same command leads to 308
.
from router.
Related Issues (20)
- Not removing superfluous path elements like //// HOT 5
- ServeFilesCustom responds for a long time when requesting a non existent file HOT 4
- Behavior change in 1.3.2 with double slashes when RedirectFixedPath is false HOT 4
- ServeFilesCustom calls PanicHandler if file does not exist HOT 2
- Consultation on route matching HOT 1
- Get Matched Route HOT 1
- Why this routing doesn't work? HOT 4
- Issue with catch-all parameter HOT 1
- How to integrate with Prometheus HOT 1
- Documentation for router.Lookup out of date HOT 2
- Group wide middlewares
- gotils is gpl HOT 2
- CORS allow ? HOT 1
- Path Route HOT 1
- how to serve files using embed? HOT 2
- incorrect regex match HOT 2
- path validation breaks group usage HOT 1
- panic: path must begin with '/' in path '' group.go:19 HOT 1
- Middleware for Group
- how to support path with and without trailing slash ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.