Realcodeart.com

CERN web server

The first web server, and the day CERN gave the software away.

Tim Berners-Lee. httpd, the line-mode browser, and libwww.

Get it on a mug or tee →

Before the web was a place, it was a program on a desk at CERN. Tim Berners-Lee wanted a way for physicists to follow a reference without fetching a new document by hand. He proposed a hypertext system that would run across the laboratory's network, and then he built the pieces that made the proposal true. There was a browser, written on a NeXT machine, that could show links and let a person edit as well as read. There was a server that listened for a request and wrote a response. There was a library of shared code that later took the name libwww.

The NeXT was a scarce machine. Nicola Pellow, a student at the laboratory, wrote a line-mode browser so that a terminal without that hardware could still walk the links. Robert Cailliau, who had pushed the project inside CERN, helped turn a personal prototype into something the organization would stand behind. In 1990 and 1991 this small stack was the web. The server accepted a connection, read what the client asked for, and sent the document back. The protocol was simple on purpose. Simplicity is why other people could write their own clients.

Berners-Lee has described a label on the machine that hosted the service, asking colleagues not to switch it off, because switching it off switched off the web. The story matters less as a relic than as a scale. One process, on one computer, was the publishing system. The bars on this piece are from that era of the daemon: the opening of HTHandle, the function that takes a socket and starts to deal with it. Each line of that function is a bar. The color is the token. The shape is the early server, not Apache, not the later industrial versions.

On 30 April 1993 CERN issued a statement that placed the server, the line-mode browser, and libwww in the public domain. Anyone could use them, change them, and ship them, with no fee and no license to negotiate. That was not a small courtesy. The laboratory could have kept the software as an internal tool, or attached conditions, or waited to see what the commercial networks would pay. Instead it gave the programs away. The gift is why this piece can be marked clear. The public-domain statement covers those programs. It is the legal reason a mug can carry the silhouette.

What happened next is the part people remember, and it depended on the part they forget. NCSA built another server. Apache grew out of patches to that line. Browsers left the line-mode terminal and then left the academic network. None of that rewriting erased the first shape. A connection arrives. A function takes the socket. A response goes out. The later servers added virtual hosts, encryption, and configuration languages. They did not invent the idea that a document could be fetched by naming it.

The bars stop early in HTHandle. They are the start of the dealing, not the whole history of HTTP. The words of this essay, and the date of the CERN statement, stay on the page. The mug and the white tee get the lines of the daemon. If a listing ever points at a shop, the buyer is paying Redbubble for ceramic and cloth. The software itself was the thing CERN declined to charge for.

It helps to remember what a request looked like. A client opened a TCP connection and sent a short text message naming a document. The server mapped that name onto a file, or onto a generated answer, and wrote the bytes back with a small header. There was no cookie jar in this picture, no session, no template language. The function the bars follow is the moment the daemon accepts that the socket is now its problem. Everything a later framework calls middleware is downstream of that accept.

The public-domain grant is easy to under-read. It did not put every CERN document in the public domain, and it did not put the words of the first public page in the public domain. Those words are a different piece in this catalog, marked differently, because prose and program were not the same gift. Here the gift is the server, the line-mode browser, and the library. The bars are taken from the server. The date, 30 April 1993, is the date the laboratory said the programs could leave.

Mug and tee of CERN web server