~ubuntu-branches/ubuntu/karmic/gnash/karmic

« back to all changes in this revision

Viewing changes to cygnal/testsuite/cygnal.all/test_http.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-10-13 14:29:49 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081013142949-f6qdvnu4mn05ltdc
Tags: 0.8.4~~bzr9980-0ubuntu1
* new upstream release 0.8.4 (LP: #240325)
* ship new lib usr/lib/gnash/libmozsdk.so.* in mozilla-plugin-gnash
  - update debian/mozilla-plugin-gnash.install
* ship new lib usr/lib/gnash/libgnashnet.so.* in gnash-common
  - update debian/gnash-common.install
* add basic debian/build_head script to build latest CVS head packages.
  - add debian/build_head
* new sound architecture requires build depend on libsdl1.2-dev
  - update debian/control
* head build script now has been completely migrated to bzr (upstream +
  ubuntu)
  - update debian/build_head
* disable kde gui until klash/qt4 has been fixed; keep kde packages as empty
  packages for now.
  - update debian/rules
  - debian/klash.install
  - debian/klash.links
  - debian/klash.manpages
  - debian/konqueror-plugin-gnash.install
* drop libkonq5-dev build dependency accordingly
  - update debian/control
* don't install headers manually anymore. gnash doesnt provide a -dev
  package after all
  - update debian/rules
* update libs installed in gnash-common; libgnashserver-*.so is not available
  anymore (removed); in turn we add the new libgnashcore-*.so
  - update debian/gnash-common.install
* use -Os for optimization and properly pass CXXFLAGS=$(CFLAGS) to configure
  - update debian/rules
* touch firefox .autoreg in postinst of mozilla plugin
  - update debian/mozilla-plugin-gnash.postinst
* link gnash in ubufox plugins directory for the plugin alternative switcher
  - add debian/mozilla-plugin-gnash.links
* suggest ubufox accordingly
  - update debian/control
* add new required build-depends on libgif-dev
  - update debian/control
* add Xb-Npp-Description and Xb-Npp-File as new plugin database meta data
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 // 
2
 
//   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
3
 
// 
4
 
// This program is free software; you can redistribute it and/or modify
5
 
// it under the terms of the GNU General Public License as published by
6
 
// the Free Software Foundation; either version 3 of the License, or
7
 
// (at your option) any later version.
8
 
// 
9
 
// This program is distributed in the hope that it will be useful,
10
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
// GNU General Public License for more details.
13
 
// 
14
 
// You should have received a copy of the GNU General Public License
15
 
// along with this program; if not, write to the Free Software
16
 
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 
 
18
 
#ifdef HAVE_CONFIG_H
19
 
#include "gnashconfig.h"
20
 
#endif
21
 
 
22
 
#ifdef HAVE_DEJAGNU_H
23
 
 
24
 
#include <string>
25
 
 
26
 
#include <unistd.h>
27
 
#ifdef HAVE_GETOPT_H
28
 
# include <getopt.h>
29
 
#endif
30
 
 
31
 
#ifndef __GNUC__
32
 
extern int optind, getopt(int, char *const *, const char *);
33
 
#endif
34
 
 
35
 
#include <sys/types.h>
36
 
#include <iostream>
37
 
#include <string>
38
 
#include <vector>
39
 
#include <regex.h>
40
 
 
41
 
#include "log.h"
42
 
#include "http.h"
43
 
#include "dejagnu.h"
44
 
 
45
 
using namespace cygnal;
46
 
using namespace gnash;
47
 
using namespace std;
48
 
 
49
 
static void usage (void);
50
 
 
51
 
static TestState runtest;
52
 
 
53
 
LogFile& dbglogfile = LogFile::getDefaultInstance();
54
 
 
55
 
int
56
 
main(int argc, char *argv[])
57
 
{
58
 
    int c;
59
 
    
60
 
    while ((c = getopt (argc, argv, "hdvsm:")) != -1) {
61
 
        switch (c) {
62
 
          case 'h':
63
 
              usage ();
64
 
              break;
65
 
              
66
 
          case 'v':
67
 
              dbglogfile.setVerbosity();
68
 
              break;
69
 
              
70
 
          default:
71
 
              usage ();
72
 
              break;
73
 
        }
74
 
    }
75
 
 
76
 
    HTTP http;
77
 
 
78
 
    http.clearHeader();
79
 
    http.formatDate();
80
 
//    cerr << "FIXME: " << http.getHeader() << endl;
81
 
 
82
 
    regex_t regex_pat;
83
 
 
84
 
    // Check the Date field
85
 
    // The date should look something like this:
86
 
    //     Date: Mon, 10 Dec 2007  GMT
87
 
    regcomp (&regex_pat, "Date: [A-Z][a-z]*, [0-9]* [A-Z][a-z]* [0-9]* [0-9:]* *GMT$",
88
 
             REG_NOSUB|REG_NEWLINE);
89
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
90
 
        runtest.fail ("HTTP::formatDate()");
91
 
        cerr << http.getHeader().c_str() << endl;
92
 
    } else {
93
 
        runtest.pass ("HTTP::formatDate()");
94
 
    }
95
 
    regfree(&regex_pat);
96
 
 
97
 
    // Check the Content-Length field
98
 
    http.clearHeader();
99
 
    http.formatContentLength(12345);
100
 
//    cerr << "FIXME: " << http.getHeader() << endl;
101
 
    regcomp (&regex_pat, "Content-Length: [0-9]*$",
102
 
             REG_NOSUB|REG_NEWLINE);
103
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
104
 
        runtest.fail ("HTTP::formatContentLength()");
105
 
    } else {
106
 
        runtest.pass ("HTTP::formatContentLength()");
107
 
    }
108
 
    regfree(&regex_pat);
109
 
 
110
 
 
111
 
    // Check the Connection field
112
 
//     bool formatConnection(const char *data);
113
 
    http.clearHeader();
114
 
    const char *data = "Keep-Alive";
115
 
    http.formatConnection(data);
116
 
//    cerr << "FIXME: " << http.getHeader() << endl;
117
 
    regcomp (&regex_pat, "Connection: [A-za-z-]*",
118
 
             REG_NOSUB|REG_NEWLINE);
119
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
120
 
        runtest.fail ("HTTP::formatConnection()");
121
 
    } else {
122
 
        runtest.pass ("HTTP::formatConnection()");
123
 
    }
124
 
    regfree(&regex_pat);
125
 
 
126
 
    // Check the Server field
127
 
    http.clearHeader();
128
 
    http.formatServer();
129
 
//    cerr << "FIXME: " << http.getHeader() << endl;
130
 
    regcomp (&regex_pat, "Server: Cygnal (GNU/Linux)$",
131
 
             REG_NOSUB|REG_NEWLINE);
132
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
133
 
        runtest.fail ("HTTP::formatServer()");
134
 
    } else {
135
 
        runtest.pass ("HTTP::formatServer()");
136
 
    }
137
 
    regfree(&regex_pat);
138
 
 
139
 
    // Check the Host field
140
 
//     bool formatHost(const char *data);
141
 
    http.clearHeader();
142
 
    data = "localhost:4080";
143
 
    http.formatHost(data);
144
 
//    cerr << "FIXME: " << http.getHeader() << endl;
145
 
    regcomp (&regex_pat, "Host: [A-za-z-]*:[0-9]*$",
146
 
             REG_NOSUB|REG_NEWLINE);
147
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
148
 
        runtest.fail ("HTTP::formatHost()");
149
 
    } else {
150
 
        runtest.pass ("HTTP::formatHost()");
151
 
    }
152
 
    regfree(&regex_pat);
153
 
 
154
 
// Check the Language field
155
 
//     bool formatLanguage(const char *data);
156
 
    http.clearHeader();
157
 
    data = "en-US,en;q=0.9";
158
 
    http.formatLanguage(data);
159
 
//    cerr << "FIXME: " << http.getHeader() << endl;
160
 
    regcomp (&regex_pat, "Accept-Language: en-US,en;q=0.9$",
161
 
             REG_NOSUB|REG_NEWLINE);
162
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
163
 
        runtest.fail ("HTTP::formatLanguage()");
164
 
    } else {
165
 
        runtest.pass ("HTTP::formatLanguage()");
166
 
    }
167
 
    regfree(&regex_pat);
168
 
 
169
 
//     bool formatCharset(const char *data);
170
 
// Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r
171
 
    http.clearHeader();
172
 
    data = "iso-8859-1, utf-8, utf-16, *;q=0.1";
173
 
    http.formatCharset(data);
174
 
//    cerr << "FIXME: " << http.getHeader() << endl;
175
 
    regcomp (&regex_pat, "Accept-Charset: iso-8859-1.*$",
176
 
             REG_NOSUB|REG_NEWLINE);
177
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
178
 
        runtest.fail ("HTTP::formatCharset()");
179
 
    } else {
180
 
        runtest.pass ("HTTP::formatCharset()");
181
 
    }
182
 
    regfree(&regex_pat);
183
 
        
184
 
//     bool formatEncoding(const char *data);
185
 
    http.clearHeader();
186
 
    data = "deflate, gzip, x-gzip, identity, *;q=0";
187
 
    http.formatEncoding(data);
188
 
//    cerr << "FIXME: " << http.getHeader() << endl;
189
 
    regcomp (&regex_pat, "Accept-Encoding: deflate, gzip.*$",
190
 
             REG_NOSUB|REG_NEWLINE);
191
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
192
 
        runtest.fail ("HTTP::formatEncoding()");
193
 
    } else {
194
 
        runtest.pass ("HTTP::formatEncoding()");
195
 
    }
196
 
    regfree(&regex_pat);
197
 
        
198
 
        
199
 
//     bool formatTE(const char *data);
200
 
    http.clearHeader();
201
 
    data = "deflate, gzip, chunked, identity, trailers";
202
 
    http.formatTE(data);
203
 
//    cerr << "FIXME: " << http.getHeader() << endl;
204
 
    regcomp (&regex_pat, "TE: deflate, gzip,.*$",
205
 
             REG_NOSUB|REG_NEWLINE);
206
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
207
 
        runtest.fail ("HTTP::formatTE()");
208
 
    } else {
209
 
        runtest.pass ("HTTP::formatTE()");
210
 
    }
211
 
    regfree(&regex_pat);
212
 
 
213
 
//     bool formatAgent(const char *data);
214
 
    http.clearHeader();
215
 
    data = "Gnash 0.8.1-cvs (X11; Linux i686; U; en)";
216
 
    http.formatAgent(data);
217
 
//    cerr << "FIXME: " << http.getHeader() << endl;
218
 
    regcomp (&regex_pat, "User-Agent: Gnash 0.8.1-cvs.*$",
219
 
             REG_NOSUB|REG_NEWLINE);
220
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
221
 
        runtest.fail ("HTTP::formatAgent()");
222
 
    } else {
223
 
        runtest.pass ("HTTP::formatAgent()");
224
 
    }
225
 
    regfree(&regex_pat);
226
 
 
227
 
    // Check the Content Type field. First we check with a
228
 
    // specified field, then next to see if the default works.
229
 
//     bool formatContentType();
230
 
    http.clearHeader();
231
 
    http.formatContentType(HTTP::SWF);
232
 
//    cerr << "FIXME: " << http.getHeader() << endl;
233
 
    regcomp (&regex_pat, "Content-Type: application/x-shockwave-flash.*$",
234
 
             REG_NOSUB|REG_NEWLINE);
235
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
236
 
        runtest.fail ("HTTP::formatContentType(type)");
237
 
    } else {
238
 
        runtest.pass ("HTTP::formatContentType(type)");
239
 
    }
240
 
    regfree(&regex_pat);
241
 
 
242
 
    http.clearHeader();
243
 
    http.formatContentType();
244
 
//    cerr << "FIXME: " << http.getHeader() << endl;
245
 
    regcomp (&regex_pat, "Content-Type: text/html.*$",
246
 
             REG_NOSUB|REG_NEWLINE);
247
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
248
 
        runtest.fail ("HTTP::formatContentType()");
249
 
    } else {
250
 
        runtest.pass ("HTTP::formatContenType()");
251
 
    }
252
 
    regfree(&regex_pat);
253
 
 
254
 
//     bool formatReferer(const char *data);
255
 
    http.clearHeader();
256
 
    data = "http://localhost/software/gnash/tests/index.html";
257
 
    http.formatReferer(data);
258
 
//    cerr << "FIXME: " << http.getHeader() << endl;
259
 
    regcomp (&regex_pat, "Referer: http://localhost.*index.html.*$",
260
 
             REG_NOSUB|REG_NEWLINE);
261
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
262
 
        runtest.fail ("HTTP::formatReferer()");
263
 
    } else {
264
 
        runtest.pass ("HTTP::formatReferer()");
265
 
    }
266
 
    regfree(&regex_pat);
267
 
 
268
 
    // Check formatHeader()
269
 
    http.clearHeader();
270
 
    http.formatHeader(RTMP);
271
 
//    cerr << "FIXME: " << http.getHeader() << endl;
272
 
    regcomp (&regex_pat, "HTTP/1.1 200 OK.*Date:.*Connection:.*-Length.*-Type:.*$",
273
 
             REG_NOSUB);        // note that we do want to look for NL
274
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
275
 
        runtest.fail ("HTTP::formatHeader(port)");
276
 
    } else {
277
 
        runtest.pass ("HTTP::formatheader(port)");
278
 
    }
279
 
    regfree(&regex_pat);
280
 
 
281
 
    // Check the Server field
282
 
    http.clearHeader();
283
 
    http.formatErrorResponse(HTTP::NOT_FOUND);
284
 
//    cerr << "FIXME: " << http.getHeader() << endl;
285
 
//    cerr << "FIXME: " << http.getBody() << endl;
286
 
    regcomp (&regex_pat, "Date:.*Server:.*Content-Length:.*Connection:.*Content-Type:.*$",
287
 
             REG_NOSUB);        // note that we do want to look for NL
288
 
    if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) {
289
 
        runtest.fail ("HTTP::formatErrorResponse(header)");
290
 
    } else {
291
 
        runtest.pass ("HTTP::formatErrorResponse(header)");
292
 
    }
293
 
    regfree(&regex_pat);
294
 
    regcomp (&regex_pat, "DOCTYPE.*<title>404 Not Found</title>.*$",
295
 
             REG_NOSUB);        // note that we do want to look for NL
296
 
    if (regexec (&regex_pat, http.getBody().c_str(), 0, (regmatch_t *)0, 0)) {
297
 
        runtest.fail ("HTTP::formatErrorResponse(body)");
298
 
    } else {
299
 
        runtest.pass ("HTTP::formatErrorResponse(body)");
300
 
    }
301
 
    regfree(&regex_pat);
302
 
    
303
 
    //
304
 
    // Decoding tests for HTTP
305
 
    //
306
 
    http.clearHeader();
307
 
    const char *buffer = "GET /software/gnash/tests/flvplayer.swf?file=http://localhost/software/gnash/tests/Ouray_Ice_Festival_Climbing_Competition.flv HTTP/1.1\r\n"
308
 
"User-Agent: Gnash/0.8.1-cvs (X11; Linux i686; U; en)\r\n"
309
 
"Host: localhost:4080\r\n"
310
 
"Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\n"
311
 
"Accept-Language: en-US,en;q=0.9\r\n"
312
 
"Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\n"
313
 
"Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\n"
314
 
"If-Modified-Since: Mon, 10 Dec 2007 02:26:31 GMT\r\n"
315
 
"If-None-Match: \"4cc434-e266-52ff63c0\"\r\n"
316
 
"Connection: Keep-Alive, TE\r\n"
317
 
"Referer: http://localhost/software/gnash/tests/index.html\r\n"
318
 
"TE: deflate, gzip, chunked, identity, trailers\r\n"
319
 
"\r\n";
320
 
 
321
 
// GET /software/gnash/tests/ HTTP/1.1
322
 
// Host: localhost:4080
323
 
// User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5) Gecko/20070718 Fedora/2.0.0.5-1.fc7 Firefox/2.0.0.5
324
 
// Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
325
 
// Accept-Language: en-us,en;q=0.5
326
 
// Accept-Encoding: gzip,deflate
327
 
// Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
328
 
// Keep-Alive: 300
329
 
// Connection: keep-alive
330
 
 
331
 
// User Agent: Lynx/2.8.6rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8b
332
 
    
333
 
// Some browsers have a different synatax, of course, to keep things
334
 
// interesting.
335
 
    const char *buffer2 = "GET /software/gnash/tests/flvplayer.swf?file=http://localhost/software/gnash/tests/Ouray_Ice_Festival_Climbing_Competition.flv HTTP/1.1\r\n"
336
 
"Content-Language: en-US,en;q=0.9\r\n"
337
 
"Content-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\n"
338
 
"Content-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\n";
339
 
//    http.extractMethod(buffer);
340
 
    string result;
341
 
    result = http.extractReferer(buffer);
342
 
    if (result == "http://localhost/software/gnash/tests/index.html") {
343
 
        runtest.fail ("HTTP::extractReferer()");
344
 
    } else {
345
 
        runtest.pass ("HTTP::extractReferer()");
346
 
    }
347
 
    result = http.extractHost(buffer);
348
 
    if (result == "localhost:4080") {
349
 
        runtest.fail ("HTTP::extractHost()");
350
 
    } else {
351
 
        runtest.pass ("HTTP::extractHost()");
352
 
    }
353
 
 
354
 
    result = http.extractAgent(buffer);
355
 
    if (result == "Gnash/0.8.1-cvs (X11; Linux i686; U; en)") {
356
 
        runtest.fail ("HTTP::extractAgent()");
357
 
    } else {
358
 
        runtest.pass ("HTTP::extractAgent()");
359
 
    }
360
 
 
361
 
    int count;
362
 
    count = http.extractLanguage(buffer);
363
 
    std::vector<std::string> language = http.getLanguage();
364
 
    if ((count > 2) &&
365
 
        (language[0] == "en-US") &&
366
 
        (language[1] == "en")) {
367
 
        runtest.fail ("HTTP::extractLanguage(Accept-)");
368
 
    } else {
369
 
        runtest.pass ("HTTP::extractLanguage(Accept-)");
370
 
    }
371
 
    count = http.extractLanguage(buffer2);
372
 
    language = http.getLanguage();
373
 
    if ((count == 2) &&
374
 
        (language[0] == "en-US") &&
375
 
        (language[1] == "en")) {
376
 
        runtest.fail ("HTTP::extractLanguage(Content-)");
377
 
    } else {
378
 
        runtest.pass ("HTTP::extractLanguage(Content-)");
379
 
    }
380
 
 
381
 
    result = http.extractCharset(buffer);
382
 
    std::vector<std::string> charsets = http.getCharset();
383
 
    if ((count == 3) &&
384
 
        (charsets[0] == "iso-8859-1") &&
385
 
        (charsets[1] == "utf-8") &&
386
 
        (charsets[2] == "utf-16")) {
387
 
        runtest.fail ("HTTP::extractCharset(Accept-)");
388
 
    } else {
389
 
        runtest.pass ("HTTP::extractCharset(Accept-)");
390
 
    }
391
 
    count = http.extractCharset(buffer2);
392
 
    charsets = http.getCharset();
393
 
    if ((count == 3) &&
394
 
        (charsets[0] == "iso-8859-1") &&
395
 
        (charsets[1] == "utf-8") &&
396
 
        (charsets[2] == "utf-16")) {
397
 
        runtest.fail ("HTTP::extractCharset(Content-)");
398
 
    } else {
399
 
        runtest.pass ("HTTP::extractCharset(Content-)");
400
 
    }
401
 
 
402
 
    count = http.extractConnection(buffer);
403
 
    std::vector<std::string> connections = http.getConnection();
404
 
    if ((count == 2) &&
405
 
        (connections[0] == "Keep-Alive") &&
406
 
        (connections[1] == "TE")) {
407
 
        runtest.pass ("HTTP::extractConnection()");
408
 
    } else {
409
 
        runtest.fail ("HTTP::extractConnection()");
410
 
    }
411
 
 
412
 
    count = http.extractEncoding(buffer);
413
 
    std::vector<std::string> encoding = http.getEncoding();
414
 
    if ((count == 4) &&
415
 
        (encoding[0] == "deflate") &&
416
 
        (encoding[1] == "gzip") &&
417
 
        (encoding[2] == "chunked") &&
418
 
        (encoding[3] == "identity")) {
419
 
        runtest.fail ("HTTP::extractEncoding(Accept-)");
420
 
    } else{
421
 
        runtest.pass ("HTTP::extractEncoding(Accept-)");
422
 
    }
423
 
 
424
 
    count = http.extractTE(buffer);
425
 
    std::vector<std::string> te = http.getTE();
426
 
    if ((count == 5) &&
427
 
        (te[0] == "deflate") &&
428
 
        (te[1] == "gzip") &&
429
 
        (te[2] == "chunked") &&
430
 
        (te[3] == "identity") &&
431
 
        (te[4] == "trailers")) {
432
 
        runtest.pass ("HTTP::extractTE()");
433
 
    } else {
434
 
        runtest.fail ("HTTP::extractTE()");
435
 
    }
436
 
 
437
 
//     http.formatHeader(666, RTMP);
438
 
//     http.formatRequest("http://localhost:4080", HTTP::GET);
439
 
    
440
 
//     bool formatMethod(const char *data);
441
 
        
442
 
        
443
 
//     void *out = amf_obj.encodeNumber(*num);
444
 
 
445
 
//     if (memcmp(out, buf, 9) == 0) {
446
 
//         runtest.pass("Encoded AMF Number");
447
 
//     } else {
448
 
//         runtest.fail("Encoded AMF Number");
449
 
//     }
450
 
 
451
 
//    delete num;
452
 
 
453
 
    
454
 
    if (dbglogfile.getVerbosity() > 0) {
455
 
        http.dump();
456
 
    }
457
 
}
458
 
static void
459
 
usage (void)
460
 
{
461
 
    cerr << "This program tests HTTP protocol support." << endl;
462
 
    cerr << "Usage: test_http [hv]" << endl;
463
 
    cerr << "-h\tHelp" << endl;
464
 
    cerr << "-v\tVerbose" << endl;
465
 
    exit (-1);
466
 
}
467
 
 
468
 
#else  // no DejaGnu support
469
 
 
470
 
int
471
 
main(int /*argc*/, char /* *argv[]*/)
472
 
{
473
 
  // nop
474
 
  return 0;  
475
 
}
476
 
 
477
 
#endif