Skip to content

s-stupnikov/http-test-suite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web server test suite

Implement a Web server. Libraries for helping manage TCP socket connections may be used (if server is asynchronous epoll must be used). Libraries that implement any part of HTTP or multiprocessing model must not be used.

Requirements

  • Respond to GET with status code in {200,403,404}
  • Respond to HEAD with status code in {200,404}
  • Respond to all other request methods with status code 405
  • Directory index file name index.html
  • Respond to requests for /<file>.html with the contents of DOCUMENT_ROOT/<file>.html
  • Requests for /<directory>/ should be interpreted as requests for DOCUMENT_ROOT/<directory>/index.html
  • Respond with the following header fields for all requests:
    • Server
    • Date
    • Connection
  • Respond with the following additional header fields for all 200 responses to GET and HEAD requests:
    • Content-Length
    • Content-Type
  • Respond with correct Content-Type for .html, .css, js, jpg, .jpeg, .png, .gif, .swf
  • Respond to percent-encoding URLs
  • No security vulnerabilities!
  • Bonus: init script for daemonization with commands: start, stop, restart, status

Testing

  • httptest folder from http-test-suite repository should be copied into DOCUMENT_ROOT
  • Your HTTP server should listen localhost:80
  • http://localhost/httptest/wikipedia_russia.html must been shown correctly in browser
  • Lowest-latency response (tested using ab, ApacheBench) in the following fashion: ab -n 50000 -c 100 -r http://localhost:8080/

About

HTTP Server test suite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 95.6%
  • JavaScript 3.3%
  • Python 1.1%