Results 1 to 10 of 13

Hybrid View

  1. #1
    that did the trick, thanks for the help!

  2. #2
    Actually, that fixed one problem and exposed another one. I now have the required cookies, and I parse them and use the result to perform a lookup in a database which is an async call. Is it OK to call async code inside the notifyUser method? It seems that this is causing an issue currently as then I change the method body to simply:

    response.success(100000000,false);

    ... everything works just fine.

    However then I call response.success(100000000,false); from the database callback function the LSClient will no longer connect.

    What is the recommended approach here?

  3. #3
    Have looked into this further - when client.connectionOptions.setCookieHandlingRequired (true); is set by the client the request headers that are sent to the notifyUser method are different. For example:

    When client.connectionOptions.setCookieHandlingRequired is set to true:

    headers:
    { cookie: 'connect.sid=s%3A8RiLRECNKkGGSJOQnKGdGizY.iqYm2IPN gzJph7Qk%2BrG1pEqktnlm0KVLtpXEVZ5L2Yw; XSRF-TOKEN=jhIQq6AYLGxE2DrjxiK8L1zg67RfV0eaCt0N0%3D',
    connection: 'keep-alive',
    host: 'localhost',
    'accept-language': 'en-US,en;q=0.5',
    accept: '*/*',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0',
    'accept-encoding': 'gzip, deflate',
    referer: 'https://localhost:4433/view1',
    REQUEST_ID: '7' } }

    .... and when client.connectionOptions.setCookieHandlingRequired is set to false:

    headers:
    { 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'cache-control': 'no-cache',
    connection: 'keep-alive',
    host: 'localhost',
    'accept-language': 'en-US,en;q=0.5',
    accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'content-length': '147',
    origin: 'https://localhost:4433',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0',
    'accept-encoding': 'gzip, deflate',
    referer: 'https://localhost:4433/view1',
    pragma: 'no-cache',
    REQUEST_ID: '4' } }

    As we can see above the headers are different by more than just the cookie. For example when setCookieHandlingRequired is true the origin field is not specified.

    When setCookieHandlingRequired is true my LS client can't connect; I have a feeling that the problem is related to the differences mentioned above.

    Please can you advise?

    Thanks.

 

 

Similar Threads

  1. NotifyUser Header
    By milad.j in forum Adapter SDKs
    Replies: 1
    Last Post: November 4th, 2013, 09:23 AM
  2. How to get SessionId in .NET client code?
    By cwt237 in forum Client SDKs
    Replies: 6
    Last Post: September 19th, 2013, 01:05 PM
  3. Send data from DataAdapter based on user/sessionID
    By gal_nitzan in forum Adapter SDKs
    Replies: 1
    Last Post: February 12th, 2013, 09:16 PM
  4. Cookie support in android library
    By eoinoc in forum Client SDKs
    Replies: 1
    Last Post: October 15th, 2012, 09:21 AM
  5. Delay in notifyUser() causes erratic create_session behavior
    By brianjohnson in forum Adapter SDKs
    Replies: 2
    Last Post: April 5th, 2010, 12:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 05:27 AM.