Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14567 > unrolled thread

cookie Kludge

Started byRoedy Green <see_website@mindprod.com.invalid>
First post2012-05-16 21:50 -0700
Last post2012-05-19 21:46 -0400
Articles 9 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  cookie Kludge Roedy Green <see_website@mindprod.com.invalid> - 2012-05-16 21:50 -0700
    Re: cookie Kludge Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-17 09:17 -0700
      Re: cookie Kludge Roedy Green <see_website@mindprod.com.invalid> - 2012-05-17 14:32 -0700
        Re: cookie Kludge Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-17 15:03 -0700
          Re: cookie Kludge Roedy Green <see_website@mindprod.com.invalid> - 2012-05-19 04:16 -0700
            Re: cookie Kludge Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-19 17:35 -0700
              Re: cookie Kludge Roedy Green <see_website@mindprod.com.invalid> - 2012-05-26 01:34 -0700
            Re: cookie Kludge Arne Vajhøj <arne@vajhoej.dk> - 2012-05-19 21:53 -0400
          Re: cookie Kludge Arne Vajhøj <arne@vajhoej.dk> - 2012-05-19 21:46 -0400

#14567 — cookie Kludge

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-05-16 21:50 -0700
Subjectcookie Kludge
Message-ID<3n09r7l6jmm986fe06toit4ald9sb38u5f@4ax.com>
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.
.

[toc] | [next] | [standalone]


#14581

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2012-05-17 09:17 -0700
Message-ID<ew9tr.23403$6Y6.14205@newsfe19.iad>
In reply to#14567
On 5/16/12 9:50 PM, Roedy Green wrote:
> 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.

[toc] | [prev] | [next] | [standalone]


#14595

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-05-17 14:32 -0700
Message-ID<6drar7hebi9b5rsids7seafkfdj4v709p8@4ax.com>
In reply to#14581
On Thu, 17 May 2012 09:17:14 -0700, Daniel Pitts
<newsgroup.nospam@virtualinfinity.net> wrote, quoted or indirectly
quoted someone who said :

>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.
.

[toc] | [prev] | [next] | [standalone]


#14601

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2012-05-17 15:03 -0700
Message-ID<2Betr.11987$x11.2247@newsfe21.iad>
In reply to#14595
On 5/17/12 2:32 PM, Roedy Green wrote:
> On Thu, 17 May 2012 09:17:14 -0700, Daniel Pitts
> <newsgroup.nospam@virtualinfinity.net>  wrote, quoted or indirectly
> quoted someone who said :
>
>> 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.

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.

[toc] | [prev] | [next] | [standalone]


#14642

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-05-19 04:16 -0700
Message-ID<m50fr75aon69qftegm5g0tk4g46l2oteoa@4ax.com>
In reply to#14601
On Thu, 17 May 2012 15:03:42 -0700, Daniel Pitts
<newsgroup.nospam@virtualinfinity.net> wrote, quoted or indirectly
quoted someone who said :

>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.
.

[toc] | [prev] | [next] | [standalone]


#14660

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2012-05-19 17:35 -0700
Message-ID<t%Wtr.22010$9H3.16209@newsfe06.iad>
In reply to#14642
On 5/19/12 4:16 AM, Roedy Green wrote:
> On Thu, 17 May 2012 15:03:42 -0700, Daniel Pitts
> <newsgroup.nospam@virtualinfinity.net>  wrote, quoted or indirectly
> quoted someone who said :
>
>> 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
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 ;-)

[toc] | [prev] | [next] | [standalone]


#14808

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-05-26 01:34 -0700
Message-ID<ib51s7p0ss5ptaveedjah5kcdhqismqqb4@4ax.com>
In reply to#14660
On Sat, 19 May 2012 17:35:37 -0700, Daniel Pitts
<newsgroup.nospam@virtualinfinity.net> wrote, quoted or indirectly
quoted someone who said :

>> 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 ;-)

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.
.

[toc] | [prev] | [next] | [standalone]


#14665

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-05-19 21:53 -0400
Message-ID<4fb84ea6$0$293$14726298@news.sunsite.dk>
In reply to#14642
On 5/19/2012 7:16 AM, Roedy Green wrote:
> On Thu, 17 May 2012 15:03:42 -0700, Daniel Pitts
> <newsgroup.nospam@virtualinfinity.net>  wrote, quoted or indirectly
> quoted someone who said :
>> 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

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

[toc] | [prev] | [next] | [standalone]


#14663

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-05-19 21:46 -0400
Message-ID<4fb84d06$0$281$14726298@news.sunsite.dk>
In reply to#14601
On 5/17/2012 6:03 PM, Daniel Pitts wrote:
> On 5/17/12 2:32 PM, Roedy Green wrote:
>> On Thu, 17 May 2012 09:17:14 -0700, Daniel Pitts
>> <newsgroup.nospam@virtualinfinity.net> wrote, quoted or indirectly
>> quoted someone who said :
>>
>>> 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.
>
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web