Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 79 lines (62 sloc) 2.87 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18
19 type msg = HttpServerCore_parse.msg
20
21 type uri = string
22 type header = msg
23 type mime = msg
24 type post_body = mime list * Rcontent.content
25
26 type response = { sl : msg ; headers : header list ; body : Rcontent.content }
27
28 type multipart_post_request = { uri:uri;
29 request_headers:header list;
30 request_body : post_body list;
31 tmpfiles : string list;
32 }
33
34 type get = uri * header list
35 type post =
36 | Multipart of multipart_post_request
37 | Simple of uri * header list * Rcontent.content
68b7e50 Norman Scaife [feature] libnet: Added PUT and DELETE methods to HttpServer.
nrs135 authored
38 type put = uri * header list * Rcontent.content
d0d0150 Norman Scaife [feature] libnet: Added all-methods option to HttpServer.
nrs135 authored
39 type optional = uri * header list
fccc685 Initial open-source release
MLstate authored
40
41 type request_line = { _method : msg ; request_uri : string ; http_version : string }
42
43 type server_info = { server_url:string; server_ip_or_name:string; server_port:int; server_secured:bool; server_id:int }
44
45 type handle_request = { hr_delcookies : bool;
46 hr_cachetype : string;
47 hr_server_info : server_info;
48 hr_is_secure : bool;
49 hr_timestamp : Time.t;
50 hr_timestamp_tm : Time.tm;
51 hr_inet_addr_str : string;
52 hr_user_agent : string;
53 hr_referer : string;
54 hr_ec : string;
55 hr_ic : string;
56 hr_dt2 : Time.t;
57 }
58
59 type request = { request_scheduler: Scheduler.t;
60 request_line : request_line;
61 request_header : header list;
62 request_message_body : Rcontent.content;
63 request_post_body : post_body list;
64 server_info : server_info;
65 is_multipart : bool;
66 handle_request : handle_request;
67 }
68
69 type web_info = { cont : response -> unit;
70 request : request;
71 connection : Scheduler.connection_info;
72 certificate : Ssl.certificate option;
73 }
74
3062e57 Cédric Soulas [feature] HttpServer and RemoteLog: push logs to a remote log server (ex...
cedricss authored
75 type remote_logs = {port : int; hostname : string; appkey : string}
76
fccc685 Initial open-source release
MLstate authored
77 val current_time_string : string ref
78 val time_diff : string ref
Something went wrong with that request. Please try again.