1%% ``Licensed under the Apache License, Version 2.0 (the "License"); 2%% you may not use this file except in compliance with the License. 3%% You may obtain a copy of the License at 4%% 5%% http://www.apache.org/licenses/LICENSE-2.0 6%% 7%% Unless required by applicable law or agreed to in writing, software 8%% distributed under the License is distributed on an "AS IS" BASIS, 9%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10%% See the License for the specific language governing permissions and 11%% limitations under the License. 12%% 13%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. 14%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings 15%% AB. All Rights Reserved.'' 16%% 17%% $Id: httpd.hrl,v 1.1 2008/12/17 09:53:33 mikpe Exp $ 18%% 19 20-include_lib("kernel/include/file.hrl"). 21 22-ifndef(SERVER_SOFTWARE). 23-define(SERVER_SOFTWARE,"inets/develop"). % Define in Makefile! 24-endif. 25-define(SERVER_PROTOCOL,"HTTP/1.1"). 26-define(SOCKET_CHUNK_SIZE,8192). 27-define(SOCKET_MAX_POLL,25). 28-define(FILE_CHUNK_SIZE,64*1024). 29-define(NICE(Reason),lists:flatten(atom_to_list(?MODULE)++": "++Reason)). 30-define(DEFAULT_CONTEXT, 31 [{errmsg,"[an error occurred while processing this directive]"}, 32 {timefmt,"%A, %d-%b-%y %T %Z"}, 33 {sizefmt,"abbrev"}]). 34 35 36-ifdef(inets_error). 37-define(ERROR(Format, Args), io:format("E(~p:~p:~p) : "++Format++"~n", 38 [self(),?MODULE,?LINE]++Args)). 39-else. 40-define(ERROR(F,A),[]). 41-endif. 42 43-ifdef(inets_log). 44-define(LOG(Format, Args), io:format("L(~p:~p:~p) : "++Format++"~n", 45 [self(),?MODULE,?LINE]++Args)). 46-else. 47-define(LOG(F,A),[]). 48-endif. 49 50-ifdef(inets_debug). 51-define(DEBUG(Format, Args), io:format("D(~p:~p:~p) : "++Format++"~n", 52 [self(),?MODULE,?LINE]++Args)). 53-else. 54-define(DEBUG(F,A),[]). 55-endif. 56 57-ifdef(inets_cdebug). 58-define(CDEBUG(Format, Args), io:format("C(~p:~p:~p) : "++Format++"~n", 59 [self(),?MODULE,?LINE]++Args)). 60-else. 61-define(CDEBUG(F,A),[]). 62-endif. 63 64 65-record(init_data,{peername,resolve}). 66-record(mod,{init_data, 67 data=[], 68 socket_type=ip_comm, 69 socket, 70 config_db, 71 method, 72 absolute_uri=[], 73 request_uri, 74 http_version, 75 request_line, 76 parsed_header=[], 77 entity_body, 78 connection}). 79