How do the HTTP/HTML Request and REST step create LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> Property?
search cancel

How do the HTTP/HTML Request and REST step create LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> Property?

book

Article ID: 14752

calendar_today

Updated On:

Products

CA Application Test

Issue/Introduction

When using the HTTP/HTML Request step or REST step to access the URL which includes Cookie(s), we sometimes see the properties like LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> after running the test case like below.

But sometimes we cannot see that property even if the Parse HTTP Header Cookies filter detects Cookies after getting the response from these steps.

How do the HTTP/HTML Request and REST Step create LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> Property? Any Rules?

Environment

Release: Service Virtualization all versions
Component: HTTP/HTML request step, REST step

Resolution

The HTTP/HTML Request step and REST step use the validation named "Apache HttpClient code for cookie validation" to validate the Cookie information from the Response of the Server.

Here is an example about this validation rule, if these steps send a request to the URL like


http://<Server Name>:<Port Number>/<Path Value>/index.html

then the validation rule checks these below:

  1. Domain in the Cookie should be same as the <Server Name> (if there is not Domain Definition in the Cookie, skip this)
  2. Path in the Cookie should be same as the <Path Value> (if there is not Path Definition in the Cookie, skip this)

If these check points are OK, then the property named LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> is created and the value is


[version: 0][name: <Cookie Name>][value: <Cookie Value>][domain: <Server Name>][path: <Path Value>][expiry: null]


(Caution:If the Path is "/" or the Path is not defined, then the property name becomes LISA_COOKIE_<Server Name>/<Cookie Name>.)

If one of these check points is not validĀ or both are not valid, then the property named LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> or LISA_COOKIE_<Server Name>/<Cookie Name> is not created.

Additional Information

We can not check the result of the "Apache HttpClient code for cookie validation" for the default log setting.
To see the checks in the log file, please do the following steps:

  1. Open %LISA_HOME%\logging.properties file
  2. Change one line from
    log4j.logger.org.apache.http=ERROR
    to
    log4j.logger.org.apache.http=WARN
    Or add one line below
    log4j.logger.org.apache.http.client.protocol=WARN
  3. Save %LISA_HOME%\logging.properties file
  4. Start DevTest Workstation
  5. Run the test case by using Interactive Test Run (ITR)

If the result of checkĀ is invalid, then you can see a warning message like below:
2017-06-02 00:52:04,594Z (09:52) [ProcDlgThreadCallbk@fabce31] WARN org.apache.http.client.protocol.ResponseProcessCookies - Cookie rejected [TUSERID="123457", version:0, domain:myhost, path:/mypath/, expiry:null] Illegal path attribute "/mypath/". Path of origin: "/index.html"
in the workstation.log file.