Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not getting the valid cookies from server.  RSS feed

 
Mukunda s Dhakate
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am posting the data to the gmail login page.
I have succeeded to post the data but in result,
I am getting the error message that
"Your browser's cookie functionality is turned off. Please turn it on"

could someone please help me in this case

thank you
Regards
Mukunda
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without your telling us what you're doing exactly (i.e, using HttpURLConnection? just java.net.Socket? the Commons HttpClient library?) we really can't help.
 
Mukunda s Dhakate
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using HttpUrlConnection.
using this I am trying to login on the Gmail account.
I am giving the cookies I have taken from the response before redirecting(respose code 302) to the result page.
but still I am stuck
 
Johnny Kewl
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its something like this
String cookie = conn.getHeaderField("Set-Cookie");
if(cookie != null){
//save the cookie
}

and when you send

if(cookie != null) conn.setRequestProperty("Cookie",savedCookie);

Have fun...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!