Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 64 lines (56 sloc) 2.288 kb
93f6bab Nicolas Niclausse MAJOR update:
nniclausse authored
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 Nicolas Niclausse MAJOR Update (not yet finished): New configuration system using an XML f...
nniclausse authored
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,
dd57fc5 Nicolas Niclausse * add content-type support (required for POST requests sent to tomcat) (...
nniclausse authored
31 content_type=[],
9a9d504 Nicolas Niclausse initial version of tsunami_recorder, a proxy to record HTTP user session...
nniclausse authored
32 headers=[],
65af9b8 Nicolas Niclausse MAJOR Update (not yet finished): New configuration system using an XML f...
nniclausse authored
33 body=[],
e4a3afe Nicolas Niclausse www_auth
nniclausse authored
34 id = 0,
35 userid, % for www_authentication
36 passwd % for www_authentication
65af9b8 Nicolas Niclausse MAJOR Update (not yet finished): New configuration system using an XML f...
nniclausse authored
37 }).
93f6bab Nicolas Niclausse MAJOR update:
nniclausse authored
38
ed79763 Nicolas Niclausse url record
nniclausse authored
39 -record(url,
40 {scheme, %% http, https, ...
41 host,
42 port, %% undefined means use default (80 or 443)
43 path = [],
44 querypart = []}).
45
93f6bab Nicolas Niclausse MAJOR update:
nniclausse authored
46 %% use by the client process to store information about the current request during
5382a9c Nicolas Niclausse improve HTTP headers functions
nniclausse authored
47 %% the parsing of the response
42b9e61 Nicolas Niclausse fix transfer chunked parsing
nniclausse authored
48 -record(http, {content_length= 0, % HTTP header: content length
49 body_size = 0, % current size of body,
50 chunk_toread = -1, % chunk data to be read (-1 = not chunked)
d5f7a79 Nicolas Niclausse better handling of closed connection by the server immediately after
nniclausse authored
51 status = none, % HTTP resp. status :200, etc. 'none'
52 % if no current cnx.
ccf403b Nicolas Niclausse - new http header parse. Cleaner and faster
nniclausse authored
53 close = false, % true if HTTP/1.0 or 'connection: close'
d5f7a79 Nicolas Niclausse better handling of closed connection by the server immediately after
nniclausse authored
54 % has benne received
ccf403b Nicolas Niclausse - new http header parse. Cleaner and faster
nniclausse authored
55 cookie=[]
93f6bab Nicolas Niclausse MAJOR update:
nniclausse authored
56 }).
57
58 %% HTTP Protocol
59 -define(GET, "GET").
60 -define(POST, "POST").
5382a9c Nicolas Niclausse improve HTTP headers functions
nniclausse authored
61
62 -define(USER_AGENT, "IDX-Tsunami").
93f6bab Nicolas Niclausse MAJOR update:
nniclausse authored
63
Something went wrong with that request. Please try again.