soheilhy / cmux

Connection multiplexer for GoLang: serve different services on the same port!
Apache License 2.0
2.53k stars 197 forks source link

HTTP1Fast matcher omits PATCH #99

Open kvrhdn opened 10 months ago

kvrhdn commented 10 months ago

Hi, cmux has been working great for us. Recently we added a PATCH endpoint to our application and were surprised the HTTP1Fast matcher doesn't automatically match on PATCH. Is there a particular reason for not including PATCH or is this an oversight?

All other methods are in there except PATCH and OPTIONS. https://github.com/soheilhy/cmux/blob/5ec6847320e53b5fee0ab9a4757b56625a946c85/matchers.go#L46-L55

buzzy commented 10 months ago

I might be crazy, but I see "OPTIONS" in that list.

kvrhdn commented 10 months ago

Oh oops, must have read over it. I was comparing it to another list of HTTP methods and didn't expect it at the top of the list I guess.