This is an incomplete HTCPCP [RFC 2324](https://datatracker.ietf.org/doc/html/rfc2324) implementation for the server and the client.
PROPFIND, GET, BREW and WHEN requests are handled. Additions are not supported.
### Server
On BREW and WHEN requests server *executes specified commands* from configuration file. This way it is possible for the server to actually launch some work via a script when requests come.
If configuration file is not present - the next launch will create it.
Default configuration file structure:
```json
{
"commands": {
"BrewCommand": "./brew.sh",
"StopPouringCommand": "./stopPouring.sh"
},
"coffee-type": "Latte",
"brew-time-sec": 10,
"max-pour-time-sec": 5
}
```
`brew-time-sec` is the approximate time it takes to brew coffee in seconds. After this amount is passed, status of the pot changes to `Pouring` and will stay it until `max-pour-time-sec` seconds are passed or an incoming request with `WHEN` method is presented.
Configuration is initialized on program start and is responsive to change of the configuration file. If the configuration file is changed - the changes will take place in server program as well. Configuration file is reopened and applied once on each incoming request. This behaviour can be turned off via `-no-autoreconf` flag. If flag is present - initial configuration will stay constant.