asmttpd icon indicating copy to clipboard operation
asmttpd copied to clipboard

Default document for sub directories?

Open sfxworks opened this issue 5 years ago • 3 comments

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

sfxworks avatar Jul 12 '20 15:07 sfxworks

Thanks for the bug report, I wonder if this is also a string_remove problem.

nemasu avatar Jul 13 '20 09:07 nemasu

The string_contains fix didn't change this behavior unfortunately. I'll try to look more into this one soon.

nemasu avatar Apr 19 '21 04:04 nemasu

Thank you!

sfxworks avatar Apr 19 '21 19:04 sfxworks