Skip to content
Newer
Older
100644 60 lines (52 sloc) 2.11 KB
93f6bab @nniclausse MAJOR update:
nniclausse authored Feb 3, 2003
1 %%% This code was developped by IDEALX (http://IDEALX.org/) and
2 %%% contributors (their names can be found in the CONTRIBUTORS file).
3 %%% Copyright (C) 2000-2001 IDEALX
4 %%%
5 %%% This program is free software; you can redistribute it and/or modify
6 %%% it under the terms of the GNU General Public License as published by
7 %%% the Free Software Foundation; either version 2 of the License, or
8 %%% (at your option) any later version.
9 %%%
10 %%% This program is distributed in the hope that it will be useful,
11 %%% but WITHOUT ANY WARRANTY; without even the implied warranty of
12 %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 %%% GNU General Public License for more details.
14 %%%
15 %%% You should have received a copy of the GNU General Public License
16 %%% along with this program; if not, write to the Free Software
17 %%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18 %%%
19
20 -vc('$Id$ ').
21 -author('nicolas.niclausse@IDEALX.com').
22
23 %% use by the client to create the request
65af9b8 @nniclausse MAJOR Update (not yet finished): New configuration system using an XM…
nniclausse authored Dec 12, 2003
24 -record(http_request, {
25 url,
26 version="1.1", % default is HTTP/1.1
27 server_name, % use for the 'Host:' header
28 get_ims_date = none, % used when the method is getims
29 cookie=none,
30 method=get,
9a9d504 @nniclausse initial version of tsunami_recorder, a proxy to record HTTP user sess…
nniclausse authored Dec 23, 2003
31 headers=[],
65af9b8 @nniclausse MAJOR Update (not yet finished): New configuration system using an XM…
nniclausse authored Dec 12, 2003
32 body=[],
33 id = 0
34 }).
93f6bab @nniclausse MAJOR update:
nniclausse authored Feb 3, 2003
35
ed79763 @nniclausse url record
nniclausse authored Nov 17, 2003
36 -record(url,
37 {scheme, %% http, https, ...
38 host,
39 port, %% undefined means use default (80 or 443)
40 path = [],
41 querypart = []}).
42
93f6bab @nniclausse MAJOR update:
nniclausse authored Feb 3, 2003
43 %% use by the client process to store information about the current request during
5382a9c @nniclausse improve HTTP headers functions
nniclausse authored Feb 17, 2003
44 %% the parsing of the response
42b9e61 @nniclausse fix transfer chunked parsing
nniclausse authored Dec 16, 2003
45 -record(http, {content_length= 0, % HTTP header: content length
46 body_size = 0, % current size of body,
47 chunk_toread = -1, % chunk data to be read (-1 = not chunked)
d5f7a79 @nniclausse better handling of closed connection by the server immediately after
nniclausse authored Dec 23, 2003
48 status = none, % HTTP resp. status :200, etc. 'none'
49 % if no current cnx.
50 close = false % true if HTTP/1.0 or 'connection: close'
51 % has benne received
93f6bab @nniclausse MAJOR update:
nniclausse authored Feb 3, 2003
52 }).
53
54 %% HTTP Protocol
55 -define(GET, "GET").
56 -define(POST, "POST").
5382a9c @nniclausse improve HTTP headers functions
nniclausse authored Feb 17, 2003
57
58 -define(USER_AGENT, "IDX-Tsunami").
93f6bab @nniclausse MAJOR update:
nniclausse authored Feb 3, 2003
59
Something went wrong with that request. Please try again.