GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTTP::WEBTEST::PLUGIN::COOKIES (3)

.ds Aq ’

NAME

HTTP::WebTest::Plugin::Cookies - Send and recieve cookies in tests

CONTENTS

SYNOPSIS

Not Applicable

DESCRIPTION

This plugin provides means to control sending and recieve cookies in web test.

TEST PARAMETERS

    accept_cookies

Option to accept cookies from the web server.

These cookies exist only while the program is executing and do not affect subsequent runs. These cookies do not affect your browser or any software other than the test program. These cookies are only accessible to other tests executed during test sequence execution.

See also the <send_cookies> parameter.

Allowed values

yes, no

Default value

yes

    send_cookies

Option to send cookies to web server. This applies to cookies received from the web server or cookies specified using the cookies test parameter.

This does NOT give the web server(s) access to cookies created with a browser or any user agent software other than this program. The cookies created while this program is running are only accessible to other tests in the same test sequence.

See also the <accept_cookies> parameter.

Allowed values

yes, no

Default value

yes

    cookie

Synonym to cookies.

It is deprecated parameter and may be removed in future versions of HTTP::WebTest.

    cookies

This is a list parameter that specifies cookies to send to the web server:



    cookies = ( cookie1_spec
                cookie2_spec
                ...
                cookieN_spec )



Currently there are two ways to specify a cookie.
o Named style

A cookie is specified by a set of param => value pairs:



    (
      param => value
      ...
    )



List of all supported param => value pairs:
version => VERSION Version number of cookie spec to use, usually 0.
name => NAME (REQUIRED) Name of cookie. Cannot begin with a $ character.
value => VALUE (REQUIRED) Value of cookie.
path => PATH (REQUIRED) URL path name for which this cookie applies. Must begin with a / character. See also path_spec.
domain => DOMAIN (REQUIRED) Domain for which cookie is valid. Must either contain two periods or be equal to .local.
port => PORT List of allowed port numbers that the cookie may be returned to. If not specified, cookie can be returned to any port. Must be specified using the format N or N, N, ..., N where N is one or more digits.
path_spec => PATH_SPEC Ignored if version is less than 1. Option to ignore the value of path. Default value is 0.
o 1

Use the value of path.

o Ignore the specified value of path.
secure => SECURE Option to require secure protocols for cookie transmission. Default value is 0.
o 1

Use only secure protocols to transmit this cookie.

o Secure protocols are not required for transmission.
maxage => MAXAGE Number of seconds until cookie expires.
discard => DISCARD Option to discard cookie when the program finishes. Default is 0. (The cookie will be discarded regardless of the value of this element.)
o 1

Discard cookie when the program finishes.

o Don’t discard cookie.
rest => NAME_VALUE_LIST Defines additional cookie attributes.

Zero, one or several name/value pairs may be specified. The name parameters are words such as Comment or CommentURL and the value parameters are strings that may contain embedded blanks.

Example (wtscript file):



    cookies = ( ( name   => Cookie1
                  value  => cookie value )

                ( name   => Cookie2
                  value  => cookie value
                  path   => /
                  domain => .company.com ) )

                ( name   => Cookie2
                  value  => cookie value
                  rest   => ( Comment => this is a comment ) )



Example (Perl script):



    my $tests = [
                  ...
                  {
                    test_name => cookie,
                    cookies   => [ [
                                     name  => Cookie1,
                                     value => Value,
                                   ],
                                   [
                                     name  => Cookie2,
                                     value => Value,
                                     path  => /,
                                   ] ],
                    ...
                  }
                  ...
                ]



o Row list style

This style of cookie specification is deprecated and may be removed in future versions of HTTP::WebTest.

Each cookie is specified by following list:



    ( VERSION
      NAME
      VALUE
      PATH
      DOMAIN
      PORT
      PATH_SPEC
      SECURE
      MAXAGE
      DISCARD
      NAME1
      VALUE1
      NAME2
      VALUE2
      ...
    )



Any element not marked below as REQUIRED may be defaulted by specifying a null value or ’’.
o VERSION (REQUIRED)

Version number of cookie spec to use, usually 0.

o NAME (REQUIRED)

Name of cookie. Cannot begin with a $ character.

o VALUE (REQUIRED)

Value of cookie.

o PATH (REQUIRED)

URL path name for which this cookie applies. Must begin with a / character. See also path_spec.

o DOMAIN (REQUIRED)

Domain for which cookie is valid. Must either contain two periods or be equal to .local.

o PORT

List of allowed port numbers that the cookie may be returned to. If not specified, cookie can be returned to any port. Must be specified using the format N or N, N, ..., N where N is one or more digits.

o PATH_SPEC

Ignored if version is less than 1. Option to ignore the value of path. Default value is 0.
o 1

Use the value of path.

o Ignore the specified value of path.

o SECURE

Option to require secure protocols for cookie transmission. Default value is 0.
o 1

Use only secure protocols to transmit this cookie.

o Secure protocols are not required for transmission.

o MAXAGE

Number of seconds until cookie expires.

o DISCARD

Option to discard cookie when the program finishes. Default is 0. (The cookie will be discarded regardless of the value of this element.)
o 1

Discard cookie when the program finishes.

o Don’t discard cookie.

o name/value

Zero, one or several name/value pairs may be specified. The name parameters are words such as Comment or CommentURL and the value parameters are strings that may contain embedded blanks.

An example cookie would look like:



    cookies = ( ( 0
                  WebTest cookie #1
                  cookie value
                  /
                  .mycompany.com
                  
                  0
                  0
                  200
                  1
                ) )



See RFC 2965 for details (ftp://ftp.isi.edu/in-notes/rfc2965.txt).

COPYRIGHT

Copyright (c) 2000-2001 Richard Anderson. All rights reserved.

Copyright (c) 2001-2003 Ilya Martynov. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

HTTP::WebTest

HTTP::WebTest::API

HTTP::WebTest::Plugin

HTTP::WebTest::Plugins

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTTP::WEBTEST::PLUGIN::COOKIES (3) 2003-03-02

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.