:- use_module('./request').
:- use_module('./response').
:- use_module('./log').
+:- use_module('./config').
% ------------------------------------------------------------------------------
-
-cert("identity.p12").
-addr('127.0.0.1').
-port(1965).
-site("./site").
-
load_certificate(Context) :-
cert(Cert),
log_msg("tls", "Loading certificate from ~s~n", [Cert]),
req_serve(S) :-
read_request(S, RequestChars),
log_msg("request", "Received raw request: ~s", [RequestChars]),
- phrase(request(uri(H, P, Path, Query)), RequestChars),
+ phrase(request(uri(_, _, Path, Query)), RequestChars),
( serve(S, Path, Query)
; log_msg("error", "File not found~n", []),
phrase(response(not_found, "File not found, sorry"), Response0),