cookie Kludge

R

Roedy Green

kobobooks.com is sending me an invalid cookie:

SEVERE: Invalid cookie for
http://www.kobobooks.com/ebook/Decision-Points/book-L_0PHOGZzEGV0pcIxTh5H
w/page1.html: version=f8fbc7aaf4a7f76c93040ef8de748cc34775e4db;
domain=.kobobooks.com; expires=Fri,
18-May-2012 04:47:05 GMT; path=/

I think the problem is version is a reserved keyword that should be
set to 1.

I tried writing a CookiePolicy.shouldAccept but the bad cookie never
gets that far.

I wrote Kobo. Have not heard back.

How can I ignore the cookie? i.e. suppress the SEVERE: error message.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Plants" with "leaves" no more efficient than today’s solar cells
could out-compete real plants, crowding the biosphere with an
inedible foliage. Tough omnivorous "bacteria" could out-compete
real bacteria: They could spread like blowing pollen, replicate
swiftly, and reduce the biosphere to dust in a matter of days.
Dangerous replicators could easily be too tough, small, and
rapidly spreading to stop -- at least if we make no preparation.
We have trouble enough controlling viruses and fruit flies.
~ Eric Drexler (born: 1955-04-25 age: 57)
Engines of Creation: The Coming Era of Nanotechnology.
..
 
D

Daniel Pitts

kobobooks.com is sending me an invalid cookie:

SEVERE: Invalid cookie for
http://www.kobobooks.com/ebook/Decision-Points/book-L_0PHOGZzEGV0pcIxTh5H
w/page1.html: version=f8fbc7aaf4a7f76c93040ef8de748cc34775e4db;
domain=.kobobooks.com; expires=Fri,
18-May-2012 04:47:05 GMT; path=/

I think the problem is version is a reserved keyword that should be
set to 1.

I tried writing a CookiePolicy.shouldAccept but the bad cookie never
gets that far.

I wrote Kobo. Have not heard back.

How can I ignore the cookie? i.e. suppress the SEVERE: error message.
There are many frameworks for making HTTP requests. A hint on which one
you're using might make it easier to help you.
 
R

Roedy Green

There are many frameworks for making HTTP requests. A hint on which one
you're using might make it easier to help you.

The cookies are handled by

CookieHandler.setDefault( new CookieManager( null /* in ram store */,
new NoKobo() ) );

The GETs are done with HttpURLConnection with my own HTTP thin wrapper
and around it.
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Plants" with "leaves" no more efficient than today's solar cells
could out-compete real plants, crowding the biosphere with an
inedible foliage. Tough omnivorous "bacteria" could out-compete
real bacteria: They could spread like blowing pollen, replicate
swiftly, and reduce the biosphere to dust in a matter of days.
Dangerous replicators could easily be too tough, small, and
rapidly spreading to stop -- at least if we make no preparation.
We have trouble enough controlling viruses and fruit flies.
~ Eric Drexler (born: 1955-04-25 age: 57)
Engines of Creation: The Coming Era of Nanotechnology.
..
 
D

Daniel Pitts

The cookies are handled by

CookieHandler.setDefault( new CookieManager( null /* in ram store */,
new NoKobo() ) );

The GETs are done with HttpURLConnection with my own HTTP thin wrapper
and around it.

I seem to recall Java's built in URLConnection stuff is actually very
bad at handling Cookies in a meaningful way. I tend to use apache
commons httpclient instead. I haven't used the new httpcore, so I'm not
sure how good it is compared.
 
R

Roedy Green

I seem to recall Java's built in URLConnection stuff is actually very
bad at handling Cookies in a meaningful way. I tend to use apache
commons httpclient instead. I haven't used the new httpcore, so I'm not
sure how good it is compared.
Thanks. I thought Apache was just a wrapper on URLConnection

I am trying to fix it the easy way first by getting kobo to generate
proper cookies.
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Plants" with "leaves" no more efficient than today's solar cells
could out-compete real plants, crowding the biosphere with an
inedible foliage. Tough omnivorous "bacteria" could out-compete
real bacteria: They could spread like blowing pollen, replicate
swiftly, and reduce the biosphere to dust in a matter of days.
Dangerous replicators could easily be too tough, small, and
rapidly spreading to stop -- at least if we make no preparation.
We have trouble enough controlling viruses and fruit flies.
~ Eric Drexler (born: 1955-04-25 age: 57)
Engines of Creation: The Coming Era of Nanotechnology.
..
 
D

Daniel Pitts

Thanks. I thought Apache was just a wrapper on URLConnection
Nope, The Apache commons stuff is a low-level implementation, which
gives you better "hooks" into some of the more advanced features of the
HTTP protocol.
I am trying to fix it the easy way first by getting kobo to generate
proper cookies.
Delegation is often good first option. Good luck with third parties
though ;-)
 
A

Arne Vajhøj

I seem to recall Java's built in URLConnection stuff is actually very
bad at handling Cookies in a meaningful way. I tend to use apache
commons httpclient instead. I haven't used the new httpcore, so I'm not
sure how good it is compared.

Just as good.

Just frustrating that they changed the API.

Arne
 
A

Arne Vajhøj

Thanks. I thought Apache was just a wrapper on URLConnection

That would be obvious.

But actually HttpClient build directly on top of Socket.

I am sure that they must have tried HttpURLConnection, but
somehow concluded that they could not do what they want with it.

Arne
 
R

Roedy Green

Delegation is often good first option. Good luck with third parties
though ;-)

no luck so far.
--
Roedy Green Canadian Mind Products
http://mindprod.com
I would be quite surprised if the NSA (National Security Agency)
did not have a computer program to scan bits of shredded
documents and electronically put them back together like a giant
jigsaw puzzle. This suggests you cannot just shred, you must also burn.
..
 

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top