Skip to content

HTTP headers that may be added #6

@LiviaMedeiros

Description

@LiviaMedeiros

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions