adafruit / Adafruit_CircuitPython_HTTPServer

Simple HTTP Server for CircuitPython
MIT License
46 stars 30 forks source link

Allow HEAD requests to files paths #48

Closed Neradoc closed 1 year ago

Neradoc commented 1 year ago

Allows these instead of a 400 status for static files. Leaves user-created routes to handle this on their own.

❯ curl -I http://192.168.1.28/index.html
HTTP/1.1 200 OK
Content-Length: 644
Content-Type: text/html
Connection: close
❯ curl -I http://192.168.1.28/NOFILE
HTTP/1.1 404 Not Found
Content-Length: 0
Content-Type: text/plain
Connection: close