|
1 T_HTTPOFFLINE |
|
2 |
|
3 This is a test suite of all the offline unit tests for HTTP. It consists of the following tests |
|
4 |
|
5 1 Core |
|
6 2 Form Encoding |
|
7 3 Header Codes |
|
8 4 RespParse |
|
9 5 HTTPhdr |
|
10 6 TextModeHeaderFilter |
|
11 |
|
12 1 Core |
|
13 --------------- |
|
14 Tests basic functionality |
|
15 |
|
16 1.1 Creating a session |
|
17 1.2 Adding filters to the session |
|
18 1.3 Creating a transaction, |
|
19 1.4 Checking and adding a body to the transaction |
|
20 1.5 Checking and altering uri to the transaction |
|
21 1.6 Checking and altering status code of the transaction |
|
22 1.7 Deleting the transaction |
|
23 1.8 Altering the connection info of the session |
|
24 |
|
25 2 Form Encoding |
|
26 --------------- |
|
27 Tests CHTTPFormEncoder class. |
|
28 |
|
29 2.1 Test Single name pair values |
|
30 2.2 Test Empty name fails correctly |
|
31 2.3 Test various combinations of name pair values |
|
32 |
|
33 |
|
34 3 Header Codes |
|
35 --------------- |
|
36 Tests encoding and decoding of http headers |
|
37 |
|
38 3.1 Test encoding of accept header |
|
39 3.2 Test encoding of accept charset header |
|
40 3.3 Test encoding of authorization header |
|
41 3.4 Test encoding of connection header |
|
42 3.5 Test encoding of content length header |
|
43 3.6 Test encoding of content type header |
|
44 3.7 Test encoding of host header |
|
45 3.8 Test encoding of transfer encoding header |
|
46 3.9 Test encoding of user agent header |
|
47 3.10 Test decoding of connection header |
|
48 3.11 Test decoding of content length header |
|
49 3.12 Test decoding of content length header |
|
50 3.13 Test decoding of server header |
|
51 3.14 Test decoding of date header |
|
52 3.15 Test decoding of transfer encoding header |
|
53 3.16 Test decoding of WWWAuthenticate header |
|
54 3.17 Test round trip encoding and decoding of connection header |
|
55 3.18 Test round trip encoding and decoding of content length header |
|
56 3.19 Test round trip encoding and decoding of content type header |
|
57 3.20 Test round trip encoding and decoding of transfer encoding header |
|
58 3.21 Test round trip encoding and decoding of invalid content length headers |
|
59 |
|
60 4 RespParse |
|
61 ----------- |
|
62 |
|
63 Validates the parsing of response headers |
|
64 |
|
65 1. A single complete set of headers |
|
66 2. A status line split across two buffers |
|
67 3. Split across several buffers + a simple response |
|
68 4. Full response, non-chunked, split over several buffers |
|
69 5. Chunked response |
|
70 6. Single buffer containing a HEAD response from Apache |
|
71 7. Single buffer containing a HEAD response from IIS |
|
72 8. Entire response in one buffer; test will iterate through it in increasing buffer sizes |
|
73 |
|
74 |
|
75 5 HTTPhdr |
|
76 --------- |
|
77 |
|
78 Validates the internal representation of headers and their corresponding values |
|
79 |
|
80 1. Accept: text/html |
|
81 2. Expires: Mon, 15 Jan 2001 10:30:25 GMT |
|
82 3. Max-Forwards: 3 |
|
83 4. Accept-Charset: us-ascii, utf-8 |
|
84 5. Accept-Language: en-gb. fr |
|
85 6. Accept: text/html; q=0.8, text/plain; q=0.2, */* |
|
86 |
|
87 6 TextModeHeaderFilter |
|
88 ---------------------- |
|
89 |
|
90 Tests the Connection header |
|
91 |
|
92 1. Connection:close |
|
93 2. bogus (accept) field to the connection header , should get removed |
|
94 3. hop by hop header to the connection header, should stay |
|
95 4. bogus (accept) field to the connection header and a hop by hop header |
|
96 |
|
97 7 Filters |
|
98 --------- |
|
99 |
|
100 Tests the filter mechanism with different events together with the order in which filters must handle events. The events tested with the filters are: |
|
101 |
|
102 1. Handling of error events |
|
103 2. Testing session delete/leave interaction |
|
104 3. Deleting from a RunError |
|
105 4. Testing status code matching with no response |
|
106 5. Testing status code matching - codes do match |
|
107 6. Testing status code matching - codes dont match |
|
108 7. Testing header matching - correct header not present |
|
109 8. Testing header matching - correct header present |
|
110 |