u413-284-si / webserv

This project is about setting up a http web server, providing a static website.
MIT License
0 stars 0 forks source link

5 response building define response elements #20

Closed gwolf-011235 closed 3 months ago

gwolf-011235 commented 4 months ago

Overview

Adds basic functionality to create HTTP response based on a HTTP request. Right now only base functionality is supported

1 ResponseBuilder

This is the main class of this PR. It is designed to be instantiated once and then reused for every response.

2 TargetResourceHandler

The responsibility of this class is to locate the target resource.

3 ResponseBodyHandler

The responsibility of this class is to create the body depending on the located target resource.

4 AutoindexHandler

The responsibility of this class is to create an autoindex page

5 Helper classes

6 utils

New utils function:

Tests

Included testfiles for AutoindexHandler, ResponseBodyBuilder, TargetResourceBuilder and utils using google mock Adapted Makefile to compile tests.