Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
v1.02-prebeta-261220: Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewerr authored and Andrewerr committed Dec 26, 2020
1 parent 19fcb6c commit 73dd611
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ COPY www /var/www

# Tell docker how to run app
EXPOSE 80
ENTRYPOINT boot.sh
ENTRYPOINT ["boot.sh"]

3 changes: 2 additions & 1 deletion boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

# Boot script for docker

echo "=> DEBUG: $0 $1"
echo "=> Booting MeowMeow webserver"
/MeowMeow/bin/MeowMeow foreground
/MeowMeow/bin/MeowMeow foreground
1 change: 1 addition & 0 deletions config/meow.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DocDir /var/www/
ListenPort 80
LogLevel 3
4 changes: 2 additions & 2 deletions src/config.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
-define(accessfile, "/etc/MeowMeow/routes.conf").
-define(max_request_length, 10000).
-define(mime_types_file, "mime.types").
-define(docdir, "/var/www/").
-define(docdir, configuration:get("DocDir",string)).
-define(chunk_size, 1400).
-define(timeout, 10000).
-define(configfile, "/etc/MeowMeow/meow.conf").
-define(defconf, #{"LogLevel" => "0", "KeepAlive"=> "10000", "ListenPort"=>"80"}). %% Default configuration
-define(defconf, #{"DocDir"=>"/var/www/","LogLevel" => "0", "KeepAlive"=> "10000", "ListenPort"=>"80"}). %% Default configuration
5 changes: 3 additions & 2 deletions src/parse_http.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-module(parse_http).
-export([http2map/1, mime_by_ext/1, mime_by_fname/1, update_lines/2, is_request_finished/1, make_request/1, parse_request/2, is_close/1]).
-import(util,[sget/2]).
-import(util,[sget2/2]).
-include("config.hrl").
-include("request.hrl").

Expand Down Expand Up @@ -117,8 +117,9 @@ parse_request(SrcAddr, Lines) ->

is_close(Request) ->
logging:debug("Header=~p",[Request#request.header]),
case string:trim(sget("Connection", Request#request.header)) of
case string:trim(sget2("Connection", Request#request.header)) of
{badkey, "Connection"} -> true;
"" -> true;
"close" -> true;
"keep-alive" -> false;
Any -> logging:err("Unrecognized connection type: ~p. Either a bug or protocol violation",[Any]),
Expand Down

0 comments on commit 73dd611

Please sign in to comment.