Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 109 lines (97 sloc) 3.816 kb
93f6bab @nniclausse 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.
74b91db @nniclausse tabs/space
nniclausse authored
18 %%%
5d10a86 @nniclausse add explicit exception in the GPL for linking EPL modules (obvious, but ...
nniclausse authored
19 %%% In addition, as a special exception, you have the permission to
20 %%% link the code of this program with any library released under
21 %%% the EPL license and distribute linked combinations including
22 %%% the two.
23
93f6bab @nniclausse MAJOR update:
nniclausse authored
24
25 -vc('$Id$ ').
41e965d @nniclausse update email
nniclausse authored
26 -author('nicolas.niclausse@niclux.org').
93f6bab @nniclausse MAJOR update:
nniclausse authored
27
28 %% use by the client to create the request
65af9b8 @nniclausse MAJOR Update (not yet finished): New configuration system using an XML f...
nniclausse authored
29 -record(http_request, {
30 url,
31 version="1.1", % default is HTTP/1.1
b628eaa @nniclausse - set the Host header during configuration phase
nniclausse authored
32 host_header, % use for the 'Host:' header
c640d11 @nniclausse http: user_agent is now customizable in the xml config file.
nniclausse authored
33 get_ims_date, % used when the method is getims
34e4b3d @nniclausse option to manually add a cookie in http requests (TSUN-111)
nniclausse authored
34 cookie = [],
c640d11 @nniclausse http: user_agent is now customizable in the xml config file.
nniclausse authored
35 method = get,
36 content_type = [],
37 headers = [],
38 body = [],
e4a3afe @nniclausse www_auth
nniclausse authored
39 id = 0,
c640d11 @nniclausse http: user_agent is now customizable in the xml config file.
nniclausse authored
40 user_agent,
9dc328f @cstar [TECH-1154] OAuth support
cstar authored
41 oauth_consumer,
42 oauth_access_token,
43 oauth_access_secret,
44 oauth_url,
e4a3afe @nniclausse www_auth
nniclausse authored
45 userid, % for www_authentication
73fdc6c @nniclausse add SOAP support, fix bugs in the recorder, more XML attributes entity n...
nniclausse authored
46 passwd, % for www_authentication
eb59f73 @cstar rfc2617 HTTP DIGEST authentication
cstar authored
47 auth_type,
48 digest_nonce,
49 digest_opaque,
50 digest_cnonce,
51 digest_nc,
94745f1 @nniclausse handle optional qop in http digest authentication
nniclausse authored
52 digest_qop,
eb59f73 @cstar rfc2617 HTTP DIGEST authentication
cstar authored
53 realm,
73fdc6c @nniclausse add SOAP support, fix bugs in the recorder, more XML attributes entity n...
nniclausse authored
54 soap_action % for SOAP support
65af9b8 @nniclausse MAJOR Update (not yet finished): New configuration system using an XML f...
nniclausse authored
55 }).
94745f1 @nniclausse handle optional qop in http digest authentication
nniclausse authored
56
ed79763 @nniclausse url record
nniclausse authored
57 -record(url,
74b91db @nniclausse tabs/space
nniclausse authored
58 {scheme, %% http, https, ...
59 host,
60 port, %% undefined means use default (80 or 443)
61 path = [],
62 querypart = []}).
ed79763 @nniclausse url record
nniclausse authored
63
74b91db @nniclausse tabs/space
nniclausse authored
64 %% use by the client process to store information about the current request during
27eedec @nniclausse plugin API change: drop the dyndata field in state_rcv. All the
nniclausse authored
65 %% the parsing of the response, and for the whole session (user_agent and cookies)
42b9e61 @nniclausse fix transfer chunked parsing
nniclausse authored
66 -record(http, {content_length= 0, % HTTP header: content length
74b91db @nniclausse tabs/space
nniclausse authored
67 body_size = 0, % current size of body,
96dcaf9 @nniclausse API plugin update: add decode_buffer/2 fun. Implemented in http for
nniclausse authored
68 chunk_toread = -1, % chunk data to be read (-1 = not chunked, -2 = not chunked, but last response was)
de4f702 @nniclausse wip: add 'protocol' logging, only implemented for HTTP currently (TSUN-1...
nniclausse authored
69 status = {none,none}, % HTTP resp. status :200, etc. 'none'
d5f7a79 @nniclausse better handling of closed connection by the server immediately after
nniclausse authored
70 % if no current cnx.
74b91db @nniclausse tabs/space
nniclausse authored
71 close = false, % true if HTTP/1.0 or 'connection: close'
56735fe @nniclausse improve Cookies support. Host HTTP header is now derived from server or ...
nniclausse authored
72 % has been received
74b91db @nniclausse tabs/space
nniclausse authored
73 partial=false, % true if headers are partially received
96dcaf9 @nniclausse API plugin update: add decode_buffer/2 fun. Implemented in http for
nniclausse authored
74 compressed={false,false}, % type of compression if body is compressed
27eedec @nniclausse plugin API change: drop the dyndata field in state_rcv. All the
nniclausse authored
75 cookie=[], %cookies of the current request
76 user_agent,
77 session_cookies = [] % Cookies of the session
74b91db @nniclausse tabs/space
nniclausse authored
78 }).
93f6bab @nniclausse MAJOR update:
nniclausse authored
79
56735fe @nniclausse improve Cookies support. Host HTTP header is now derived from server or ...
nniclausse authored
80
81 -record(cookie,{
74b91db @nniclausse tabs/space
nniclausse authored
82 key,
83 value,
84 quoted,
85 comment,
86 comment_url,
87 discard,
88 domain,
89 max_age,
90 expires,
91 path,
92 port,
93 secure,
94 version}).
56735fe @nniclausse improve Cookies support. Host HTTP header is now derived from server or ...
nniclausse authored
95
93f6bab @nniclausse MAJOR update:
nniclausse authored
96 %% HTTP Protocol
97 -define(GET, "GET").
98 -define(POST, "POST").
c138ea1 @nniclausse Add support for HEAD, PUT and DELETE method for HTTP. Fix for TSUN-22
nniclausse authored
99 -define(PUT, "PUT").
100 -define(HEAD, "HEAD").
101 -define(DELETE, "DELETE").
1fe17e0 @nniclausse improve webdav plugin (TSUN-61). Works with litmus.
nniclausse authored
102 -define(OPTIONS, "OPTIONS").
5382a9c @nniclausse improve HTTP headers functions
nniclausse authored
103
5345a3b @nniclausse rename idx-tsunami to tsung step 3
nniclausse authored
104 -define(USER_AGENT, "Tsung").
069be48 @nniclausse add check for user agent frequency sum
nniclausse authored
105 -define(USER_AGENT_ERROR_MSG, "Total sum of user agents frequency is not equal to 100").
93f6bab @nniclausse MAJOR update:
nniclausse authored
106
96dcaf9 @nniclausse API plugin update: add decode_buffer/2 fun. Implemented in http for
nniclausse authored
107 -define(MAX_HEADER_SIZE, 65536). % used for http_chunk:decode
108
Something went wrong with that request. Please try again.