GeeCON Prague 2014*
The moose likes Sockets and Internet Protocols and the fly likes HTTPClient - cookie problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "HTTPClient - cookie problem" Watch "HTTPClient - cookie problem" New topic
Author

HTTPClient - cookie problem

Lee Lowder
Greenhorn

Joined: Apr 05, 2012
Posts: 6

I am currently trying to use HTTPClient 4.1.3 to try to login to an app.

It is mostly working well, but this app sets cookies based on certain groups, and some of these groups have spaces in the name.

This is resulting in cookies being set with spaces in the name. It works in a browser, but for some reason is not working in httpclient.

I am using compatibility mode for the cookies, and when I dump them to screen, I do see the full value I am expecting.

I am also seeing the full cookie value in the Apache logs when I enable that level of logging.

However, I am seeing a truncated version in the webapp's logging.

Is there a different cookie mode I need to use, or is there something I am missing perhaps?

Any ideas are appreciated.
Lee Lowder
Greenhorn

Joined: Apr 05, 2012
Posts: 6

Just as an update.

I've determined that the problem is that httpclient is stripping quotes from the cookie value.

I'm currently trying to create a custom cookie spec to make it not do this, but having trouble with locating documentation to assist with this.

If anyone has any suggestions, or knows of any documents that are for httpclient 4.1.3, I would appreciate it.
 
GeeCON Prague 2014
 
subject: HTTPClient - cookie problem