[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cookie rejected, domain doesn't match request.



   All - I've tried for two days to get this connection to happen but I'm
   afraid that I'm stumped.


   Specifically I'm getting "cookie rejected, domain doesn't match
   request.",
   with the cookie attribute: "cookie attr domain=.happyvax.ezrez.com"

   -- note that there is a dot at the beginning of my host name.
   -- but I'm not sure if that is where this fails since it occurs late
   in the debug file.


   This is my logic path:


   URL is: https://happyvax.ezrez.com/service/xml/bookings_v2.cfm


   I go thru the 302 redirect for the login page, and that seems to work
   as I get: "/adm/agent_tools/login.cfm"


   I append this to my host creating:

   https://happyvax.ezrez.com/adm/agent_tools/login.cfm

   -- which I assume is ok for the next phase.


   Where I insert username and password using the WEBFORM code, not a lot
   of visibility there in the Debug File so I'm not sure that the form is
   accepted.


   And then I http_url_post to:
   [1]https://happyvax.ezrez.com/adm/agent_tools/login.cfm

   -- the return code is a 1, so that looks ok.


   I go thru the 302 redirect using the request URL using:

   https://happyvax.ezrez.com/service/xml/bookings_v2.cfm?custid=80443


   but that returns me to: /adm/agent_tools/login.cfm

   -- which is what I got from the beginning, like I didn't login
   successfully.



   Thru all these steps I don't seem to be getting a failure, that is
   until I read the Debug File (below), and I see the cookie rejected
   error.  I did a Google search on that phrase but didn't find a hit
   that is LIBHTTP related.  In the end I get a:
   SetError() #44: CommSSL_read:  connection broken

   Which I assume is a result of the domain failure.  If that's not the
   case, then how do I determine if the WEBFORM_postData worked or not?



   Any hints on where I'm going wrong?


   Below please find the RPG code, the debug file, and a snippet of the
   login page.



   Thanks in advance for any pointers you might be able to provide,

   Hawk


   //-----------------------------------------------------

   //Set debug mode and file.

   http_debug(Debug:DebugFile);


   //-----------------------------------------------------

   //Use cookies.

   http_use_cookies(*on);


   //-----------------------------------------------------

   //Change default '100-continue response' timeout period.

   http_Set_100_timeout(5);


   //-----------------------------------------------------

   //Handle HTTP 302 redirect to login panel.


   wkHOST = 'https://happyvax.ezrez.com';

   wkURL = %trim(wkHOST) + '/service/xml/bookings_v2.cfm';


   dou rc <> 302;

     rc = http_url_get(wkURL: '/tmp/test.html');


     if rc = 302;

       wkURL = http_redir_loc;

     endif;

   enddo;


   if rc <> 1;

     (error handling)

   endif;


   wkURL = %trim(wkHOST) + WKurl;


   //-----------------------------------------------------

   //Login with username and password.


   Form = WEBFORM_open();


   WEBFORM_SetVar(Form: 'username': %trim(EzRezUSER));

   WEBFORM_SetVar(Form: 'password': %trim(EzRezPWD));


   WEBFORM_postData(Form: pLogin: LoginLen);


   rc = http_url_post(%trim(wkURL):

                     pLogin:

                     LoginLen:

                     RespFile:

                     HTTP_TIMEOUT:

                     HTTP_USERAGENT:

                     'application/x-www-form-urlencoded');

   if  rc < 1;

     exsr $ShutDown;

   endif;

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

   The debug file

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

   ************Beginning of
   data**************

   HTTPAPI Ver 1.23 released
   2008-04-24

   OS/400 Ver
   V5R4M0



   http_url_post(): entered

   http_persist_open():
   entered

   http_long_ParseURL():
   entered

   DNS resolver retrans: 2

   DNS resolver retry  :
   2

   DNS resolver options:
   x'00000136'

   DNS default domain:
   happytours.com

   DNS server found:
   10.120.1.15

   DNS server found:
   67.17.215.132

   DNS server found:
   67.17.215.133

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

   Dump of server-side certificate information:

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

   Cert Validation Code =
   6000

   -----BEGIN CERTIFICATE-----

   (certificate string  "MIIC2TCCAkKgAwIBAgIDB...")

   -----END
   CERTIFICATE-----

   Serial Number:
   07:4B:96

   Serial Number: 07:4B:96

   Common Name:
   *.ezrez.com

   Country:
   US

   State/Province: Hawaii

   Locality:
   Honolulu

   Org Unit: EzRez Software
   Inc

   Issuer Country:
   US

   Issuer Org:
   Equifax

   Issuer Org Unit: Equifax Secure Certificate
   Authority

   Version:
   03

   not before: 20070419132015

   not after:
   20090419132015

   pub key alg:
   1.2.840.113549.1.1.5



   Protocol Used: TLS Version
   1

   http_persist_post():
   entered

   http_long_ParseURL():
   entered

   do_post():
   entered

   cookie=custid not sent
   (expired)

   cookie=custid not sent
   (expired)

   POST /adm/agent_tools/login.cfm
   HTTP/1.1

   Host:
   happyvax.ezrez.com

   User-Agent:
   http-api/1.23

   Content-Type: application/x-www-form-urlencoded

   Expect:
   100-continue

   Content-Length: 40

   Cookie: $Version=0; cfid=1643575; $Path=/; $Version=0;
   cftoken=57210997; $Path=/; $Version=0;
   bigipserverp-cfweb-https=369238282.478





   recvresp(): entered

   HTTP/1.1 100
   Continue





   SetError() #13: HTTP/1.1 100
   Continue

   senddoc():
   entered

   username=BkgHisData&password=BkgHisData1

   recvresp():
   entered

   HTTP/1.1 200
   OK

   HTTP/1.1 200 OK

   Date: Fri, 03 Oct 2008 19:35:21
   GMT

   Server: Apache

   Set-Cookie: CUSTID=0;expires=Wed, 03-Oct-2007 19:35:21
   GMT;path=/

   Set-Cookie: CUSTID=0;domain=.happyvax.ezrez.com;expires=Wed,
   03-Oct-2007 19:35:21 GMT;path=/

   Set-Cookie:
   CFSESSION=SESSIONID%3D10%2E33%2E4%2E1%253AIAD664819%2E5582%26REFERER%3
   D%252Ftravel%252Farc%2Ecfm%253Ftab%253Dp;expires=S

   Pragma:
   no-cache

   Expires: {ts '2008-10-03
   12:35:21'}

   cache-control: no-cache, no-store,
   must-revalidate

   Content-Language:
   en-US

   Connection:
   close

   Content-Type: text/html;
   charset=UTF-8

   Set-Cookie: BIGipServerp-cfweb-https=134357258.47873.0000;
   path=/

   Vary:
   Accept-Encoding





   SetError() #13: HTTP/1.1 200
   OK

   recvdoc parms: identity
   0

   header_load_cookies()
   entered

   header_load_cookies()
   entered

   cookie_parse()
   entered

   cookie =  CUSTID=0;expires=Wed, 03-Oct-2007 19:35:21
   GMT;path=/

   cookie attr
   custid=0

   cookie attr expires=Wed, 03-Oct-2007 19:35:21
   GMT

   cookie attr
   path=/

   cookie_parse()
   entered

   cookie =  CUSTID=0;domain=.happyvax.ezrez.com;expires=Wed, 03-Oct-2007
   19:35:21 GMT;path=/

   cookie attr
   custid=0

   cookie attr
   domain=.happyvax.ezrez.com
                                                     

   cookie attr expires=Wed, 03-Oct-2007 19:35:21
   GMT

   cookie attr
   path=/

   cookie rejected, domain doesn't match
   request.
                           

   cookie_parse()
   entered

   cookie =
   CFSESSION=SESSIONID%3D10%2E33%2E4%2E1%253AIAD664819%2E5582%26REFERER%3
   D%252Ftravel%252Farc%2Ecfm%253Ftab%253Dp;expires=Sun

   cookie attr
   cfsession=SESSIONID%3D10%2E33%2E4%2E1%253AIAD664819%2E5582%26REFERER%3
   D%252Ftravel%252Farc%2Ecfm%253Ftab%253Dp

   cookie attr expires=Sun, 26-Sep-2038 19:35:21
   GMT

   cookie attr
   path=/

   cookie_parse()
   entered

   cookie_parse() entered

   cookie =  BIGipServerp-cfweb-https=134357258.47873.0000;
   path=/

   cookie attr
   bigipserverp-cfweb-https=134357258.47873.0000

   cookie attr
   path=/

   recvdoc():
   entered

   SetError()
   #0:

     <html> <head>  <title>EzRez Admin - Happy Vacations</title>  <link
   rel="SHORTCUT ICON"...

   href="https://sd.ezrez.com/assets/39713/ima

   SetError() #44: CommSSL_read:  connection
   broken

   http_close():
   entered



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

   A small portion of the login panel in HTML

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

   <form action="login_process.cfm" method="post"
   onsubmit="this.submit.disabled=true;">

    <table cellpadding="0" cellspacing="2"
   border="0">

    <tr>

     <td
   class="label">Username</td>

     <td><input type="text" name="username"
   size="20"></td>

    </tr>

    <tr>

     <td
   class="label">Password</td>

     <td><input type="password" name="password"
   size="20"></td>

    </tr>

    </table>

References

   1. https://happyvax.ezrez.com/adm/agent_tools/login.cfm
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------