Skip to content

Correcting the problem with path not ended with '/'

Latest
Compare
Choose a tag to compare
@codemee codemee released this 03 Sep 04:23
· 6 commits to master since this release
e232d29

In the previous release, path not ended with '/' would be treated as one ended with '/'. This would make the relative paths in HTML tag be treated in a wrong way. For example, if a client request the path "/www2" and ESP8266WebServer found there's a index.html in "/www2" folder, it would returning the index.html file back to the client. In the mean time, the client thinks the path is "/", not "/www2/", so if there's a relative path such as "main.css" in the HTML, the client would request "/main.css" but not "/www2/main.css". In this version, the same request path "/www2" would be response as "400 Bad request".