asmttpd
asmttpd copied to clipboard
Default document for sub directories?
C:\Users\shaba>curl -I http://localhost:8080/
HTTP/1.1 200 OK
Server: asmttpd/0.4.4
Accept-Ranges: bytes
Content-Length: 17905
Content-Type: text/html
C:\Users\shaba>curl -I http://localhost:8080/plans
HTTP/1.1 200 OK
Server: asmttpd/0.4.4
Accept-Ranges: bytes
Content-Length: 9223372036854775807
Content-Type: application/octet-stream
C:\Users\shaba>curl -I http://localhost:8080/plans/index.html
HTTP/1.1 200 OK
Server: asmttpd/0.4.4
Accept-Ranges: bytes
Content-Length: 22342
Content-Type: text/html
C:\Users\shaba>curl -I http://localhost:8080/support/
HTTP/1.1 200 OK
Server: asmttpd/0.4.4
Accept-Ranges: bytes
Content-Length: 9223372036854775807
Content-Type: application/octet-stream
C:\Users\shaba>curl -I http://localhost:8080/support/index.html
HTTP/1.1 200 OK
Server: asmttpd/0.4.4
Accept-Ranges: bytes
Content-Length: 33833
Content-Type: text/html
Appears to be a scenario where the base domain automatically routes to index.html but everything else gets treated as application/octet-stream. Seems similar to https://github.com/nemasu/asmttpd/issues/13
Thanks for the bug report, I wonder if this is also a string_remove problem.
The string_contains fix didn't change this behavior unfortunately. I'll try to look more into this one soon.
Thank you!