~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/inets/src/http_server/httpd_conf.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-07 15:07:37 UTC
  • mfrom: (1.2.1 upstream) (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090507150737-i4yb5elwinm7r0hc
Tags: 1:13.b-dfsg1-1
* Removed another bunch of non-free RFCs from original tarball
  (closes: #527053).
* Fixed build-dependencies list by adding missing comma. This requires
  libsctp-dev again. Also, added libsctp1 dependency to erlang-base and
  erlang-base-hipe packages because the shared library is loaded via
  dlopen now and cannot be added using dh_slibdeps (closes: #526682).
* Weakened dependency of erlang-webtool on erlang-observer to recommends
  to avoid circular dependencies (closes: #526627).
* Added solaris-i386 to HiPE enabled architectures.
* Made script sources in /usr/lib/erlang/erts-*/bin directory executable,
  which is more convenient if a user wants to create a target Erlang system.
* Shortened extended description line for erlang-dev package to make it
  fit 80x25 terminals.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%%<copyright>
2
 
%% <year>1997-2008</year>
3
 
%% <holder>Ericsson AB, All Rights Reserved</holder>
4
 
%%</copyright>
5
 
%%<legalnotice>
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
 
5
%% 
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
11
 
%%
 
11
%% 
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
 
16
%% 
 
17
%% %CopyrightEnd%
16
18
%%
17
 
%% The Initial Developer of the Original Code is Ericsson AB.
18
 
%%</legalnotice>
19
19
%%
20
20
-module(httpd_conf).
21
21
 
210
210
load("SocketType " ++ SocketType, []) ->
211
211
    case check_enum(clean(SocketType),["ssl","ip_comm"]) of
212
212
        {ok, ValidSocketType} ->
213
 
            {ok, [], {com_type,ValidSocketType}};
 
213
            {ok, [], {socket_type,ValidSocketType}};
214
214
        {error,_} ->
215
215
            {error, ?NICE(clean(SocketType) ++ " is an invalid SocketType")}
216
216
    end;
362
362
load("SSLPasswordCallbackFunction " ++ SSLPasswordCallbackFunction, []) ->
363
363
    {ok, [], {ssl_password_callback_function,
364
364
              list_to_atom(clean(SSLPasswordCallbackFunction))}};
 
365
load("SSLPasswordCallbackArguments " ++ SSLPasswordCallbackArguments, []) ->
 
366
    {ok, [], {ssl_password_callback_arguments, 
 
367
                                 SSLPasswordCallbackArguments}};
365
368
load("DisableChunkedTransferEncodingSend " ++ TrueOrFalse, []) ->
366
369
    case list_to_atom(clean(TrueOrFalse)) of
367
370
        true ->
516
519
validate_config_params([{ssl_password_callback_function, Value} | _]) ->
517
520
    throw({ssl_password_callback_function, Value});
518
521
 
 
522
validate_config_params([{ssl_password_callback_arguments, Value} | Rest]) 
 
523
  when is_list(Value) ->
 
524
    validate_config_params(Rest);
 
525
validate_config_params([{ssl_password_callback_arguments, Value} | _]) ->
 
526
    throw({ssl_password_callback_arguments, Value});
 
527
 
519
528
validate_config_params([{disable_chunked_transfer_encoding_send, Value} |
520
529
                        Rest])  when Value == true; Value == false ->
521
530
    validate_config_params(Rest);
596
605
    ok.
597
606
 
598
607
config(ConfigDB) ->
599
 
    case httpd_util:lookup(ConfigDB,com_type,ip_comm) of
 
608
    case httpd_util:lookup(ConfigDB, socket_type,ip_comm) of
600
609
        ssl ->
601
610
            case ssl_certificate_file(ConfigDB) of
602
611
                undefined ->
874
883
                undefined ->
875
884
                    [];
876
885
                Function ->
877
 
                    case catch apply(Module, Function, []) of
 
886
                    Args = case httpd_util:lookup(ConfigDB, 
 
887
                                           ssl_password_callback_arguments) of
 
888
                               undefined ->
 
889
                                   [];
 
890
                               Arguments  ->
 
891
                                   [Arguments]
 
892
                           end,
 
893
               
 
894
                    case catch apply(Module, Function, Args) of
878
895
                        Password when list(Password) ->
879
896
                            [{password, Password}];
880
897
                        Error ->