stretchr / goweb

A lightweight RESTful web framework for Go
632 stars 61 forks source link

Unable to pass in a URL as a parameter #5

Closed rmulley closed 11 years ago

rmulley commented 11 years ago

For example if I wanted to pass in stripe.com in a url like:

www.example.com/api/company/stripe.com/info

And listener was setup as such:

goweb.MapFunc("/api/company/{company}/info/", func(c *goweb.Context) {
    fmt.Println(c.PathParams["company"])
}) //goweb.MapFunc

I get "stripe" printed out, instead of "stripe.com"

matryer commented 11 years ago

OK this test now passes: https://github.com/stretchrcom/goweb/commit/32a2159d3b04be1c1f5b1857afee65d184136355#L1R27

Please confirm and close.

rmulley commented 11 years ago

Thanks for the quick fix, looks great.

matryer commented 11 years ago

Why did this get reverted?

dwa012 commented 11 years ago

There was a bad commit. I went back to fix it. The issue should not have been referenced.