Http-server

From NovaOrdis Knowledge Base
Revision as of 05:50, 8 January 2017 by Ovidiu (talk | contribs) (→‎Features)
Jump to navigation Jump to search

Internal

Overview

A simple, multithreaded experimental HTTP/1.1 (RFC 2616) web server. Developed to experiment with the behavior of user agents and proxies.

The server registers itself with the JVM as an MBean, as "novaordis:service=http-server", so it can be managed via a standard JMX client such as VisualVM or JConsole.

GitHub

https://github.com/NovaOrdis/playground/tree/master/http/http-server

Run

./bin/http-server <port> [document-root]

The document-root is optional, it will sever the current directory if not specified.

Features

The server assumes HTTP/1.1 persistent connections, as described in HTTP Persistent Connections. The server can be configured to close the connection after the initial request/response sequence by specifying "persistent-connections=false" on the command line.