Add a paragraph to summarize the motivation for releases since 5.815
[libwww-perl-eserte.git] / t / misc / negotiate
blob4da733f2ba6563845fe3b63df7acbe37c321c18f
2 use HTTP::Request;
3 use HTTP::Negotiate;
5  #  ID       QS     Content-Type   Encoding Char-Set        Lang   Size
6  $variants = 
7   [['var1',  1.000, 'text/html;version=2.0',   'gzip',   'iso-8859-1',   'en',   3000],
8    ['var2',  0.950, 'text/plain',  ['uuencode',
9                                     'compress'],  'iso-8859-2','se',    400],
10    ['var3',  0.3,   'image/gif',   undef,   undef,          undef, 43555],
11  ];
14 $request = new HTTP::Request 'GET', 'http://localhost/';
15 $request->header('Accept', 'text/plain; q=0.55, image/jpg; mbx=10000');
16 $request->push_header('Accept', 'text/*; q=0.01');
17 $request->header('Accept-Language', 'no, en');
18 $request->header('Accept-Charset', 'iso-8859-1');
19 $request->header('Accept-Encoding', 'gzip');
21 #print $request->as_string;
23 $HTTP::Negotiate::DEBUG = 1;
25 $a = choose($variants);
27 print "SEL=$a\n";