Contributing
Development Workflow
Section titled “Development Workflow”- Fork the repository
- Create a feature branch:
git checkout -b feature/my-change - Make changes and add tests
- Run the full test suite:
ctest --test-dir build --output-on-failure - Run consistency check:
bash tests/check_consistency.sh - Submit a pull request
Adding a New Directive
Section titled “Adding a New Directive”- Add the directive type to
include/htaccess_directive.h(enum + AllowOverride category) - Add parsing in
src/htaccess_parser.c - Add printing in
src/htaccess_printer.c - Create or update executor in
src/htaccess_exec_*.c - Add execution dispatch in
src/mod_htaccess.c - Add AllowOverride filtering in
src/htaccess_dirwalker.c - Add free logic in
src/htaccess_directive.c - Add unit tests in
tests/unit/ - Update
tests/check_consistency.shexpected count - Update README.md directive list
Code Style
Section titled “Code Style”- C11 for module code, C++17 for tests
- 4-space indentation
snake_casefor functions and variablesUPPER_CASEfor constants and macros- No dynamic allocation in hot paths (use thread-local buffers)
- All public functions prefixed with
htaccess_,exec_, orlsi_
License
Section titled “License”LiteHTTPD is licensed under GPLv3, matching OpenLiteSpeed.