Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


CAtlHttpClient Navigate fails

Posted on 2006-05-31
Medium Priority
Last Modified: 2013-11-20
I have code as follows
I am sending a cookie as extra headers and sending some xml as post data
and navigating to a URL as follows

CAtlNavigateData  navData;
navData.SetExtraHeaders("Cookie:SessionID=" + strSessionId + ";");

CAtlHttpClient cli;

if(!cli.Navigate(&m_urlServer, &navData))
     //It always fails If I send Extra headers

Navigate always returing false.....
I am using Tomcat as the web server
If I remove the line navData.SetExtraHeaders("Cookie:SessionID=" + strSessionId + ";");
It works fine...BUt I need to send the sesionid as a cookie

Help me.
Question by:ekartha
  • 2
LVL 22

Expert Comment

ID: 16799621
Have you tried to execute CAtlHttpClient::NegotiateAuth() method before calling Navigate() ?
CAtlHttpClient::NegotiateAuth() attempts to meet the security requirements of the requested URL....

http://msdn2.microsoft.com/de-de/library/bh8x58dh.aspx <==


Author Comment

ID: 16805328
No the problem is different.
If I set Cookie header before navigate It gets failed...If i remove the line of setting Cookie as extra header
it works fine.

the same thing works for Pramati Server...
But it doesn't work for TomCat server

Is there any se rver side settings?

Author Comment

ID: 16806438
I found the solution

we need to send a newline after the Cookie header as follows
navData.SetExtraHeaders("Cookie:SessionID=" + strSessionId + "\r\n");


Accepted Solution

CetusMOD earned 0 total points
ID: 17032872
PAQed with points refunded (250)

Community Support Moderator

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question