deislabs / wagi

Write HTTP handlers in WebAssembly with a minimal amount of work
Apache License 2.0
890 stars 44 forks source link

SERVER_NAME, SERVER_PORT, and SERVER_PROTOCOL sometimes wrong #5

Closed technosophos closed 3 years ago

technosophos commented 4 years ago

It appears that Hyper does not always set this information on the URL object it sends. So sometimes defaults are inserted when it seems like actual values should be available.

technosophos commented 3 years ago

The implementation of these is slightly more complicated than what we currently have. Name and Port, for example, should be parsed from the HOST header if possible.

SERVER_NAME: https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.14 SERVER_PORT: https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.15 SERVER_PROTOCOL: https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.16