Skip to content
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

HTTP headers that may be added #6

Open
3 of 13 tasks
LiviaMedeiros opened this issue Sep 4, 2023 · 0 comments
Open
3 of 13 tasks

HTTP headers that may be added #6

LiviaMedeiros opened this issue Sep 4, 2023 · 0 comments

Comments

@LiviaMedeiros
Copy link
Owner

Some HTTP mechanisms that may be added:

  • Accept / Content-Type
    Implemented for errors.
    Easy to implement for arbitrary files by checking extension and/or using libmagic, but it's a guessing game.
  • Accept-Encoding / Content-Encoding
    Compression. This would be fun to have and it should be implemented, but the practical benefit too questionable.
  • Accept-Language / Content-Language
    The former is not applicable, the latter can be implemented but it's a guessing game.
  • Accept-Ranges / Range / Content-Range
    Implemented, with deviations from standard. Responses with multipart/byteranges are absurd to implement here.
  • Authorization
    Theoretically speaking, this can be used to access files that don't belong to current user. Feasible as is, but how to avoid horrid security implications?
  • Cache-Control
    Not really applicable. Caching local files should be done by OS.
  • Connection / Keep-Alive
    For some methods, it's somewhat possible to implement aborting with TimeoutError and closing file descriptors if the response body state happens to be stalling. Fun, but not very useful and probably not very robust.
  • Expect / request Content-Length
    This can be applicable as in "is there enough of free space on device" or "does FS support files this big". Unfortunately, we don't always know request body size, free space can vary, and 100 is not the most convenient thing in HTTP.
  • Cookie / Set-Cookie
    Maybe there will be a brilliant idea. Someday.
  • Host / Origin / Referer
    Maybe there should be some value that will be ignored internally anyway.
  • If-Match / If-None-Match / ETag
    Implemented.
  • If-Modified-Since / If-Unmodified-Since / Last-Modified
    Implemented.
  • Client Hints
    There are lots of interesting things like Downlink, but usability is questionable even if it was simple to implement.
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

No branches or pull requests

1 participant