Implementation:SeleniumHQ Selenium Civetweb Core
| Knowledge Sources | |
|---|---|
| Domains | C_Plus_Plus, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored C implementation of the CivetWeb embedded HTTP/HTTPS server core.
Description
The core C implementation of the CivetWeb embedded web server (forked from Mongoose). This is a large, self-contained C source file implementing HTTP/HTTPS serving, CGI, WebSocket support, IPv6, TLS/SSL, file serving, and related functionality. Supports Windows, Linux, macOS, and other POSIX platforms with appropriate compile-time feature flags. Originally created by Sergey Lyubka, continued by the CivetWeb developers. Licensed under MIT.
Usage
Compiled as part of the Selenium IE WebDriver native components to provide an embedded HTTP server for handling WebDriver protocol requests locally.
Code Reference
Source Location
- Repository: SeleniumHQ_Selenium
- File: third_party/cpp/civetweb/civetweb.c
Key Details
// Platform-specific defines
#define _WIN32_WINNT 0x0501 // Windows target
#define _GNU_SOURCE // Linux extensions
#define _XOPEN_SOURCE 600 // POSIX compliance
#define _LARGEFILE_SOURCE // Large file support
#define _FILE_OFFSET_BITS 64 // 64-bit file offsets