Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-31349 Change Path property for all cookies #18479

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions esp/bindings/http/platform/httptransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1565,11 +1565,10 @@ void CHttpRequest::parseCookieHeader(char* cookiestr)
if(name.charAt(0) != '$')
{
cookie = new CEspCookie(name.str(), value.str());
cookie->setPath("/");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether this will change anything. The Path has been set to '/' when new a CEspCookie (

).

cookie->setVersion(version);
m_cookies.append(*cookie);
}
else if(stricmp(name.str(), "$Path") == 0 && cookie != NULL)
cookie->setPath(value.str());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether it is safe or not, The existing code uses the Path in the appendToRequestHeader() and appendToResponseHeader(). What if a third party ESP client needs it?

else if(stricmp(name.str(), "$Domain") == 0 && cookie != NULL)
cookie->setDomain(value.str());
else if(stricmp(name.str(), "$Port") == 0 && cookie != NULL)
Expand Down
Loading