chmorgan/esphttpd-freertos

Incorrect path in ROUTE_REDIRECT?

Closed this issue · 4 comments

In the ROUTE_REDIRECTs below, was it intended that the second one should instead be ROUTE_REDIRECT("/test/", "/test/index.html"),?

Lines 173..175 in user_main.c

	ROUTE_REDIRECT("/test", "/test/index.html"),
	ROUTE_REDIRECT("/test", "/test/index.html"),
	ROUTE_CGI("/test/test.cgi", cgiTestbed),

@jcwren it could be. Does it behave differently with that change? I thought the trailing slash wouldn't matter.

I'll have to check, but as I recall, if you ended the URL with a '/', it would not redirect correctly. I'd have to test to see, it's been almost 2 months.

Given that the lines are duplicate you are probably correct. Or you could remove the duplicate line. Either way seems like a reasonable change.

fixed in PR #10