You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Vasudevan Comandur <vc...@gmail.com> on 2012/09/27 21:49:09 UTC

Parsing of Set-Cookie in HTTPClient 3.1 Version

Hi,

  I am using HTMLUnit 2.6 which uses the HTTPClient 3.1 jar file. The
cookie value returned to HTMLUnit has corrupted values.
  Trying to figure why the value of the Cookie string has changed.

  I was analysing the data transfer thru a web proxy tool and this is what
I found.

  Original Set-Cookie header from Host


xploreCookies={"standardsLicenseId":"0","openUrl":"NA","enterpriseLicenseId":"0","isIp":"false","desktopReportingUrl":"null","openUrlImgLoc":"NA","products":"IEL|VDE|","contactName":"NA","isChargebackUser":"false","contactEmail":"NA","oldSessionKey":"KFWG946KOwzR11w2m1Nxxx2B9vUv3g87Pm3*6ZpsGyUs14HLuWsDK7Bx2FIQx3Dx3D-18x2dv10fgohpBt3Xs0XqhOfBNgx3Dx3D1t5obVnf1D9x2BkhlHMXhZOQx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D","userIds":"80882","instImage":"","isInst":"true","isDelegatedAdmin":"false","isMember":"false","customerSurvey":"NA","smallBusinessLicenseId":"0","openUrlTxt":"NA"};
domain=.ieee.org; path=/

   The values that were sent out on the wire by HTTPClient due to
redirection is

---------------------------------------------------------------------------------------------------------------

xploreCookies={"standardsLicenseId":"0"; "openUrl":"NA"=;
"enterpriseLicenseId":"0"=; "isIp":"false"=; "desktopReportingUrl":"null"=;
"openUrlImgLoc":"NA"=; "products":"IEL|VDE|"=; "contactName":"NA"=;
"isChargebackUser":"false"=; "contactEmail":"NA"=;
"oldSessionKey":"KFWG946KOwzR11w2m1Nxxx2B9vUv3g87Pm3*6ZpsGyUs14HLuWsDK7Bx2FIQx3Dx3D-18x2dv10fgohpBt3Xs0XqhOfBNgx3Dx3D1t5obVnf1D9x2BkhlHMXhZOQx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D"=;
"userIds":"80882"=; "instImage":""=; "isInst":"true"=;
"isDelegatedAdmin":"false"=; "isMember":"false"=;  "customerSurvey":"NA"=;
"smallBusinessLicenseId":"0"=; "openUrlTxt":"NA"}=

  Can someone throw light on why the cookie value has been changed?.

   Any pointers and help required to solve this problem is appreciated.

   Looking forward to the reply.

Thanks & Regards
 Vasu

Re: Parsing of Set-Cookie in HTTPClient 3.1 Version

Posted by Vasudevan Comandur <vc...@gmail.com>.
Hi William,

    Can I provide you the trace taken from web proxy product?. Would that
help.

    What I saw was that IEEE site was sending a cookie as a JSON object
which is sent earlier and HTTPClient was not
    processing it properly.

    I hope the below cookie data would give a clue as to why HTTPClient was
not processing the data correctly.

Regards
 Vasu

On Mon, Oct 1, 2012 at 11:40 PM, William Speirs <ws...@apache.org> wrote:

> Can you provide a wire log from HttpClient (set log level to debug for the
> client)?
>
> Bill-
>
> On Thu, Sep 27, 2012 at 3:49 PM, Vasudevan Comandur <vcomandur@gmail.com
> >wrote:
>
> > Hi,
> >
> >   I am using HTMLUnit 2.6 which uses the HTTPClient 3.1 jar file. The
> > cookie value returned to HTMLUnit has corrupted values.
> >   Trying to figure why the value of the Cookie string has changed.
> >
> >   I was analysing the data transfer thru a web proxy tool and this is
> what
> > I found.
> >
> >   Original Set-Cookie header from Host
> >
> >
> >
> >
> xploreCookies={"standardsLicenseId":"0","openUrl":"NA","enterpriseLicenseId":"0","isIp":"false","desktopReportingUrl":"null","openUrlImgLoc":"NA","products":"IEL|VDE|","contactName":"NA","isChargebackUser":"false","contactEmail":"NA","oldSessionKey":"KFWG946KOwzR11w2m1Nxxx2B9vUv3g87Pm3*6ZpsGyUs14HLuWsDK7Bx2FIQx3Dx3D-18x2dv10fgohpBt3Xs0XqhOfBNgx3Dx3D1t5obVnf1D9x2BkhlHMXhZOQx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D","userIds":"80882","instImage":"","isInst":"true","isDelegatedAdmin":"false","isMember":"false","customerSurvey":"NA","smallBusinessLicenseId":"0","openUrlTxt":"NA"};
> > domain=.ieee.org; path=/
> >
> >    The values that were sent out on the wire by HTTPClient due to
> > redirection is
> >
> >
> >
> ---------------------------------------------------------------------------------------------------------------
> >
> > xploreCookies={"standardsLicenseId":"0"; "openUrl":"NA"=;
> > "enterpriseLicenseId":"0"=; "isIp":"false"=;
> "desktopReportingUrl":"null"=;
> > "openUrlImgLoc":"NA"=; "products":"IEL|VDE|"=; "contactName":"NA"=;
> > "isChargebackUser":"false"=; "contactEmail":"NA"=;
> >
> >
> "oldSessionKey":"KFWG946KOwzR11w2m1Nxxx2B9vUv3g87Pm3*6ZpsGyUs14HLuWsDK7Bx2FIQx3Dx3D-18x2dv10fgohpBt3Xs0XqhOfBNgx3Dx3D1t5obVnf1D9x2BkhlHMXhZOQx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D"=;
> > "userIds":"80882"=; "instImage":""=; "isInst":"true"=;
> > "isDelegatedAdmin":"false"=; "isMember":"false"=;
>  "customerSurvey":"NA"=;
> > "smallBusinessLicenseId":"0"=; "openUrlTxt":"NA"}=
> >
> >   Can someone throw light on why the cookie value has been changed?.
> >
> >    Any pointers and help required to solve this problem is appreciated.
> >
> >    Looking forward to the reply.
> >
> > Thanks & Regards
> >  Vasu
> >
>

Re: Parsing of Set-Cookie in HTTPClient 3.1 Version

Posted by William Speirs <ws...@apache.org>.
Can you provide a wire log from HttpClient (set log level to debug for the
client)?

Bill-

On Thu, Sep 27, 2012 at 3:49 PM, Vasudevan Comandur <vc...@gmail.com>wrote:

> Hi,
>
>   I am using HTMLUnit 2.6 which uses the HTTPClient 3.1 jar file. The
> cookie value returned to HTMLUnit has corrupted values.
>   Trying to figure why the value of the Cookie string has changed.
>
>   I was analysing the data transfer thru a web proxy tool and this is what
> I found.
>
>   Original Set-Cookie header from Host
>
>
>
> xploreCookies={"standardsLicenseId":"0","openUrl":"NA","enterpriseLicenseId":"0","isIp":"false","desktopReportingUrl":"null","openUrlImgLoc":"NA","products":"IEL|VDE|","contactName":"NA","isChargebackUser":"false","contactEmail":"NA","oldSessionKey":"KFWG946KOwzR11w2m1Nxxx2B9vUv3g87Pm3*6ZpsGyUs14HLuWsDK7Bx2FIQx3Dx3D-18x2dv10fgohpBt3Xs0XqhOfBNgx3Dx3D1t5obVnf1D9x2BkhlHMXhZOQx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D","userIds":"80882","instImage":"","isInst":"true","isDelegatedAdmin":"false","isMember":"false","customerSurvey":"NA","smallBusinessLicenseId":"0","openUrlTxt":"NA"};
> domain=.ieee.org; path=/
>
>    The values that were sent out on the wire by HTTPClient due to
> redirection is
>
>
> ---------------------------------------------------------------------------------------------------------------
>
> xploreCookies={"standardsLicenseId":"0"; "openUrl":"NA"=;
> "enterpriseLicenseId":"0"=; "isIp":"false"=; "desktopReportingUrl":"null"=;
> "openUrlImgLoc":"NA"=; "products":"IEL|VDE|"=; "contactName":"NA"=;
> "isChargebackUser":"false"=; "contactEmail":"NA"=;
>
> "oldSessionKey":"KFWG946KOwzR11w2m1Nxxx2B9vUv3g87Pm3*6ZpsGyUs14HLuWsDK7Bx2FIQx3Dx3D-18x2dv10fgohpBt3Xs0XqhOfBNgx3Dx3D1t5obVnf1D9x2BkhlHMXhZOQx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D"=;
> "userIds":"80882"=; "instImage":""=; "isInst":"true"=;
> "isDelegatedAdmin":"false"=; "isMember":"false"=;  "customerSurvey":"NA"=;
> "smallBusinessLicenseId":"0"=; "openUrlTxt":"NA"}=
>
>   Can someone throw light on why the cookie value has been changed?.
>
>    Any pointers and help required to solve this problem is appreciated.
>
>    Looking forward to the reply.
>
> Thanks & Regards
>  Vasu
>