Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webserv

A tiny HTTP server in x86-64 Assembly (Linux)

webserv browser screenshot

Overview

webserv is a minimal HTTP server built with raw Linux syscalls. It handles:

  • GET /path -> returns file content (200 OK)
  • POST /path -> creates or overwrites file (201 Created)
  • Missing file -> 404 Not Found

This project focuses on low-level systems and networking fundamentals.

Features

  • Pure x86-64 assembly server
  • Socket lifecycle: socket -> bind -> listen -> accept
  • Concurrent clients with fork
  • Manual HTTP parsing
  • Local file serving and file writing
  • Clean build with make or build.sh

Architecture

Client
  |
  v
socket(8080)
  -> bind
  -> listen
  -> accept loop
       -> fork
          -> child reads request
             -> parse method/path
             -> GET  -> open/read/send file
             -> POST -> find body/write file
             -> send status response
          -> close client and exit child

Project Structure

webserv/
|- src/
|  |- main.s
|- obj/
|  |- main.o
|- bin/
|  |- main
|- Makefile
|- build.sh
|- README.md

Build and Run

# Build (default target is build)
make

# Run
make run

Or with script:

./build.sh
./bin/main

Server address:

http://127.0.0.1:8080

About

A minimal HTTP/1.0 web server written in x86-64 Linux assembly handles GET and POST requests using raw syscalls, fork-based concurrency, and zero dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages