config.go 175 B

123456789101112
  1. package httpupgrade
  2. func (c *Config) GetNormalizedPath() string {
  3. path := c.Path
  4. if path == "" {
  5. return "/"
  6. }
  7. if path[0] != '/' {
  8. return "/" + path
  9. }
  10. return path
  11. }