Skip to content

ThomasHabets/tarweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO Improvements

TODO:

  • Enable EPOLLET & EPOLLONESHOT?
  • Short read/write means no need to try again
  • use event.data.ptr to find connection, not look up by fd
  • EPOLLRDHUP?
  • EPOLLHUP? (don't bother reading from closed connection)
  • Keepalive connection
  • request timeout
  • support headerless, where all headers are already pre-inserted into the tarfile
  • verify that archive doesn't have sparse files
  • content-type
  • FDO

Useful references

Memory allocations per request

Full file request

  • 4096 bytes request read buffer.
  • 40 bytes for 5 output queue entries
    • status200
    • if applicable: keepalive header
    • if applicable: transfer encoding header
    • file-specific headers (namely content-length)
    • contents

Range read

  • 4096 bytes request read buffer.
  • regex match_results parsing range header
  • 48 bytes (should be enough) for range header
  • output queue entries (see full request)

About

Serve a static website from a tar file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published