Documentation ¶
Overview ¶
Implements the HTTP routing strategy used by the amppkg server. The main purpose for rolling our own is to be able to route the following types of URLs:
/priv/doc/https://example.com/esc%61ped%2Furl.html
and have the signer sign the URL exactly as it is encoded in the request, in order to meet docs/cache_requirements.md.
The default http mux had some problems which led to me investigating 3rd party routers. (TODO(twifkak): Remember and document those problems.)
I investigated two 3rd party routers capable of handling catch-all suffix parameters:
https://github.com/julienschmidt/httprouter https://github.com/dimfeld/httptreemux
Both libs unescape their catch-all parameters, making the above use-case impossible. The latter does so despite documenting support for unmodified URL escapings. This, plus a lack of feature needs, led me to believe that writing our own mux was the best approach.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.