Skip to content

Allow HEAD requests to files paths #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented Apr 13, 2023

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

Copy link
Member

@anecdata anecdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Tested, with and without a HEAD route, in conjunction with #47.

@anecdata anecdata merged commit a8b68f1 into adafruit:main Apr 19, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 20, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 2.4.1 from 2.4.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#107 from BiffoBear/raw_dns
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#110 from dgnuff/dhcp-buffer-overflow
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#106 from BiffoBear/bugfix_socket_send

Updating https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer to 2.5.0 from 2.4.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#48 from Neradoc/respond-to-file-head
  > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#47 from Neradoc/allow-no-route

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants