soheilhy / cmux

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

HTTP1Fast matcher omits PATCH #99

Open yvrhdn opened 1 year ago

yvrhdn commented 1 year 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 1 year ago

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

yvrhdn commented 1 year 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.