weidazhao / Hosting

Hosting prototype
170 stars 35 forks source link

context.Request.Path is not set when requesting default path behind a gateway #34

Closed rmja closed 8 years ago

rmja commented 8 years ago

Forwarding request / on a gateway correctly sets the forwarded path to /sf-someguid/, but this line removes the last / hence the request path is not set in the middleware on the backend. This causes problems with e.g. UseDefaultFiles() which requires the path to be defined. What is the motivation behind setting remainingPathValue = string.Empty?

weidazhao commented 8 years ago

Yup, it's a bug. I don't remember why I added that line.. I've removed it.

https://github.com/weidazhao/Hosting/commit/efc917b7e46cc055b4684091f955b33525bec41c

rmja commented 8 years ago

Perfect, thanks:-)