Skip to content

Commit

Permalink
""
Browse files Browse the repository at this point in the history
git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@926 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
Claes Wikstrom committed Nov 20, 2005
1 parent b6f249f commit 6cf3ece
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/yaws.erl
Expand Up @@ -8,8 +8,8 @@
-module(yaws).
-author('klacke@bluetail.com').

-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").


Expand Down
4 changes: 2 additions & 2 deletions src/yaws_api.erl
Expand Up @@ -11,8 +11,8 @@
%% -compile(export_all).


-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").


Expand Down
4 changes: 2 additions & 2 deletions src/yaws_cgi.erl
@@ -1,9 +1,9 @@
-module(yaws_cgi).
-author('carsten@codimi.de').

-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-include_lib("yaws/include/yaws.hrl").
-include("../include/yaws.hrl").

-export([call_cgi/5, call_cgi/4, call_cgi/3, call_cgi/2]).

Expand Down
4 changes: 2 additions & 2 deletions src/yaws_compile.erl
Expand Up @@ -12,8 +12,8 @@



-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").


Expand Down
4 changes: 2 additions & 2 deletions src/yaws_config.erl
Expand Up @@ -11,8 +11,8 @@



-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").


Expand Down
2 changes: 1 addition & 1 deletion src/yaws_content_negotiation.erl
@@ -1,7 +1,7 @@
-module(yaws_content_negotiation).
-export([compute_rsva/2, parse_accept_field/1, match_media_type/2]).

-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws_api.hrl").

%% TODO: analyze impact of spaces in headers; when/where to strip?

Expand Down
4 changes: 2 additions & 2 deletions src/yaws_ctl.erl
Expand Up @@ -13,8 +13,8 @@

-compile(export_all).
-include_lib("kernel/include/file.hrl").
-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").


Expand Down
4 changes: 2 additions & 2 deletions src/yaws_debug.erl
Expand Up @@ -10,8 +10,8 @@
-compile(export_all).


-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").


Expand Down
4 changes: 2 additions & 2 deletions src/yaws_log.erl
Expand Up @@ -21,8 +21,8 @@
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]).

-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").

%% 1 meg log we wrap
Expand Down
4 changes: 2 additions & 2 deletions src/yaws_ls.erl
Expand Up @@ -11,8 +11,8 @@

-compile(export_all).

-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").

-include_lib("kernel/include/file.hrl").
Expand Down
4 changes: 2 additions & 2 deletions src/yaws_revproxy.erl
Expand Up @@ -8,8 +8,8 @@
-module(yaws_revproxy).
-compile(export_all).

-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").

%% reverse proxy implementation.
Expand Down
15 changes: 11 additions & 4 deletions src/yaws_server.erl
Expand Up @@ -13,8 +13,8 @@

-behaviour(gen_server).

-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").

-include_lib("kernel/include/file.hrl").
Expand Down Expand Up @@ -715,14 +715,21 @@ do_accept(GS) when GS#gs.ssl == ssl ->


initial_acceptor(GS) ->
GC = GS#gs.gconf,
if
GS#gs.ssl == nossl ->
acceptor(GS);
GS#gs.ssl == ssl ->
initial_acceptor(GS, 5)
end.


% an SSL connection might include user interaction.
% So while one person has a dialog box on the screen asking him to review
% the server's certificate, no other person is able to establish a new
% connnection to the server.
% unless we run multiple SSL acceptor processes
% Therefore, the code below!

initial_acceptor(_GS, 0) ->
ok;
initial_acceptor(GS, 1) ->
Expand All @@ -743,7 +750,7 @@ acceptor(GS) ->
proc_lib:spawn_link(yaws_server, acceptor0, [GS, self()]).
acceptor0(GS, Top) ->
?TC([{record, GS, gs}]),
put(gc, GC=GS#gs.gconf),
put(gc, GS#gs.gconf),
X = do_accept(GS),
Top ! {self(), next},
case X of
Expand Down
4 changes: 2 additions & 2 deletions src/yaws_ssl.erl
Expand Up @@ -13,8 +13,8 @@
%% module isn't used any more
%% replaced by builtin support for http in OTP ssl module

-include_lib("yaws/include/yaws.hrl").
-include_lib("yaws/include/yaws_api.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").

-include_lib("kernel/include/file.hrl").
Expand Down

0 comments on commit 6cf3ece

Please sign in to comment.