open log file s = MakeServerSocket if bad exit while fd = accept read req get fn open file log it if 1.0 or 1.1 if open worked send metadata 200 OK Content-type: image/jpeg text/html text/plain send file else msg = "HTTP/1.0 404 hate\r\nContent-Type: text/plain\r\n\r\n\r\nThe files was not found"; send msg else if open worked send file else send("File not found") clooose(fd);