RE: any libcurl API to delete expired cookies?

2013-09-21 Thread Daniel Stenberg

On Sat, 21 Sep 2013, Daniel Stenberg wrote:


I'll modify the test case instead. Tomorrow.


Test 1514 is now changed to use year 2037 instead so that 32bit and 64 bit 
time_t libcurls work the same...


--

 / daniel.haxx.se
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


RE: any libcurl API to delete expired cookies?

2013-09-20 Thread Daniel Stenberg

On Fri, 20 Sep 2013, Steve Holme wrote:

I appreciate that I've been breaking the auto builds a fair bit over the 
last few of days so we haven't been able to see the wood for the trees so to 
speak, but it appears that test 1415 breaks on AIX, IRIX and Tru64 for the 
01 Jan 2038 dates which if I've understood the logs correctly is 
representing the date numerically as 2147483647 rather than 2145916800:


-.example.com TRUE / FALSE 2145916800 test2value test2
-.example.com TRUE / FALSE 2145916800 test4value test4
-.example.com TRUE / FALSE 2145916800 test7value test7
+.example.com TRUE / FALSE 2147483647 test2value test2
+.example.com TRUE / FALSE 2147483647 test4value test4
+.example.com TRUE / FALSE 2147483647 test7value test7


Thanks for pointing this out. I'll have to research this a bit then. It looks 
perhaps it is a 32bit vs 64bit thing and could be due to an overflow somewhere 
or whatever.


I'll start out on my 32bit linux host and see how that runs.

--

 / daniel.haxx.se
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


RE: any libcurl API to delete expired cookies?

2013-09-20 Thread Steve Holme
On Tue, 17 Sep 2013, Daniel Stenberg wrote:

  I create patch again which branch is branched from curl git master
today.
  Please check it.
  https://github.com/aYasuharuYamada/curl/commit/b30ce0b990e52ea4b44
  7cfbfbb21e77b5c399200

 Thanks a lot, I've renumbered 9001 to 1415 but I also had to change the
 numbers in the test for the numerical representation of the expiration
date
 for the cookies that aren't expired. Let's see if this will give us
reasons to dig
 deeper or not.

I appreciate that I've been breaking the auto builds a fair bit over the
last few of days so we haven't been able to see the wood for the trees so to
speak, but it appears that test 1415 breaks on AIX, IRIX and Tru64 for the
01 Jan 2038 dates which if I've understood the logs correctly is
representing the date numerically as 2147483647 rather than 2145916800:

-.example.com TRUE / FALSE 2145916800 test2value test2
 -.example.com TRUE / FALSE 2145916800 test4value test4
 -.example.com TRUE / FALSE 2145916800 test7value test7
 +.example.com TRUE / FALSE 2147483647 test2value test2
 +.example.com TRUE / FALSE 2147483647 test4value test4
 +.example.com TRUE / FALSE 2147483647 test7value test7

Kind Regards

Steve
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


RE: any libcurl API to delete expired cookies?

2013-09-20 Thread Daniel Stenberg

On Fri, 20 Sep 2013, Daniel Stenberg wrote:

Thanks for pointing this out. I'll have to research this a bit then. It 
looks perhaps it is a 32bit vs 64bit thing and could be due to an overflow 
somewhere or whatever.


Right, like...

#if SIZEOF_TIME_T  5
  /* 32 bit time_t can only hold dates to the beginning of 2038 */
  if(yearnum  2037) {
*output = 0x7fff;
return PARSEDATE_LATER;
  }
#endif

;-)

I'll modify the test case instead. Tomorrow.

--

 / daniel.haxx.se
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Re: any libcurl API to delete expired cookies?

2013-09-17 Thread YAMADA Yasuharu
Hi Daniel,

2013/9/13 Daniel Stenberg dan...@haxx.se

 On Fri, 28 Jun 2013, YAMADA Yasuharu wrote:

  I think the feature of removing expired cookies should be separate from
 the one that limits the total amount of cookies. I'm convinced there are
 people who might want that expiring feature without the max limit set.


 I quarry expired cookies patch from my [new feature] Maximum limitation
 of cookies patch. Please check.


 Hello again Yamada,

 I found this old patch by accident lingering around and I thought I'd take
 a look and see if we can merge this. I can't apply it since both git and
 patch says the patch file is illegally formatted.

 Could you please give it a quick check and if possible submit a fixed
 version that I can try out?


I create patch again which branch is branched from curl git master today.
Please check it.
https://github.com/aYasuharuYamada/curl/commit/b30ce0b990e52ea4b447cfbfbb21e77b5c399200
In this, test number 9001 is just dummy.

And I do curl tests related cookie and all tests are ok.
$ ./runtests.pl 6 7 8 27 31 46 53 61 62 73 171 172 179 506 598 1024 1025
1104 1105 1216 1218 1228 1331 1401 1408 9001
* System characteristics 
* curl 7.33.0-DEV (i686-pc-cygwin)
* libcurl/7.33.0-DEV OpenSSL/1.0.1e zlib/1.2.8 libidn/1.26
* Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
* Host: nordica
* System: CYGWIN_NT-6.1-WOW64 nordica 1.7.22(0.268/5/3) 2013-07-22 17:06
i686 Cygwin
* Server SSL:OFF  libcurl SSL:  ON
* debug build:   OFF  track memory: OFF
* valgrind:  OFF  HTTP IPv6 ON
* FTP IPv6   ON   Libtool lib:  OFF
* Shared build:  yes
* SSL library:   OpenSSL
* Ports:
*   HTTP/8990 FTP/8992 FTP2/8995 RTSP/9007
*   TFTP/8997 HTTP-IPv6/8994 RTSP-IPv6/9008 FTP-IPv6/8996
*   GOPHER/9009 GOPHER-IPv6/9009
*   SSH/8999 SOCKS/9000 POP3/9001 IMAP/9003 SMTP/9005
*   POP3-IPv6/9002 IMAP-IPv6/9004 SMTP-IPv6/9006
*   HTTPTLS/9011 HTTPTLS-IPv6/9012
*   HTTP-PIPE/9014
*
test 006...[HTTP with simple cookie send]
-d-p--e--- OK (1   out of 25 , remaining: 00:52)
test 007...[HTTP with cookie parser and header recording]
-d-p-oe--- OK (2   out of 25 , remaining: 00:26)
test 008...[HTTP with cookie parsing from header file]
-d-p--e--- OK (3   out of 25 , remaining: 00:17)
test 027...[Get same cookie page several times]
-d-p--e--- OK (4   out of 25 , remaining: 00:14)
test 031...[HTTP with weirdly formatted cookies and cookiejar storage]
-d-p-oe--- OK (5   out of 25 , remaining: 00:11)
test 046...[HTTP, get cookies and store in cookie jar]
-d-p-oe--- OK (6   out of 25 , remaining: 00:09)
test 053...[HTTP, junk session cookies]
-d-p--e--- OK (7   out of 25 , remaining: 00:07)
test 061...[HTTP with various cookies and custom Host:]
-d-p-oe--- OK (8   out of 25 , remaining: 00:06)
test 062...[HTTP, send cookies when using custom Host:]
-d-p--e--- OK (9   out of 25 , remaining: 00:05)
test 073...[HTTP, receive cookies when using custom Host:, domain using
only two dots]
-d-p-oe--- OK (10  out of 25 , remaining: 00:04)
test 171...[HTTP, get cookie with dot prefixed full domain]
-d-p-oe--- OK (11  out of 25 , remaining: 00:04)
test 172...[HTTP with cookies file and custom added cookie]
-d-p--e--- OK (12  out of 25 , remaining: 00:03)
test 179...[HTTP using proxy and cookies with path checks]
-d-p--e--- OK (13  out of 25 , remaining: 00:03)
test 506...[HTTP with shared cookie list (and dns cache)]
soe--- OK (14  out of 25 , remaining: 00:02)
test 598...[curl_easy_reset with referer and other strings set]
-d-p--e--- OK (15  out of 25 , remaining: 00:02)
test 1024...[HTTP Location: following with cookies]
-d-p--e--- OK (16  out of 25 , remaining: 00:02)
test 1025...[HTTP Location: following with command-line and server cookies]
-d-p--e--- OK (17  out of 25 , remaining: 00:01)
test 1104...[HTTP cookie expiry date at Jan 1 00:00:00 GMT 1970]
-d-p--e--- OK (18  out of 25 , remaining: 00:01)
test 1105...[HTTP with cookie parser and header recording]
-d-p-oe--- OK (19  out of 25 , remaining: 00:01)
test 1216...[HTTP cookie domains tailmatching the host name]
-d-p--e--- OK (20  out of 25 , remaining: 00:01)
test 1218...[HTTP cookies and domains with same prefix]
-d-p--e--- OK (21  out of 25 , remaining: 00:00)
test 1228...[HTTP cookie path match]
-d-p--e--- OK (22  out of 25 , remaining: 00:00)
test 1331...[HTTP --proxy-anyauth and 407 with cookies]
-d-p--e--- OK (23  out of 25 , remaining: 00:00)
test 1401...[--libcurl for GET with various options]
-d-p-oe--- OK (24  out of 25 , remaining: 00:00)
test 1408...[HTTP receive cookies over IPV6]
---p--e--- OK (25  out of 25 , remaining: 00:00)
Warning: test9001 not present in tests/data/Makefile.am
test 9001...[Delete expired cookies]
-d-p-oe--- OK (26  out of 26 , remaining: 00:00)
TESTDONE: 26 tests out of 26 reported OK: 100%
TESTDONE: 26 tests were considered during 7 seconds.

-- 
.


The contents of this e-mail 

Re: any libcurl API to delete expired cookies?

2013-09-12 Thread Daniel Stenberg

On Fri, 28 Jun 2013, YAMADA Yasuharu wrote:

I think the feature of removing expired cookies should be separate from the 
one that limits the total amount of cookies. I'm convinced there are people 
who might want that expiring feature without the max limit set.


I quarry expired cookies patch from my [new feature] Maximum limitation of 
cookies patch. Please check.


Hello again Yamada,

I found this old patch by accident lingering around and I thought I'd take a 
look and see if we can merge this. I can't apply it since both git and patch 
says the patch file is illegally formatted.


Could you please give it a quick check and if possible submit a fixed version 
that I can try out?


--

 / daniel.haxx.se
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Re: any libcurl API to delete expired cookies?

2013-06-27 Thread xi xi
hi, YAMADA Yasuharu

Thanks for your reply. And I also notice that you made some patchs on
cookie issues recently, good job:)

I believe that it's better for libcurl to provide a API option to set
limitation on cookie sizes. This API will surely enhance memory
optimization and also prevent the cookiejar file becoming bigger and bigger.




2013/6/27 YAMADA Yasuharu yasuharu.yam...@access-company.com

 Hi xi,

 When I contributed a patch of [new feature] Maximum limitation of
 cookies, the patch includes a feature of deleting expired cookie.
 I think the new feature is not loaded.

 See these mails and remove_expired() function.
 http://curl.haxx.se/mail/lib-2013-04/0381.html
 http://curl.haxx.se/mail/lib-2013-05/0010.html
 http://curl.haxx.se/mail/lib-2013-05/0048.html
 http://curl.haxx.se/mail/lib-2013-05/0074.html
 http://curl.haxx.se/mail/lib-2013-05/0075.html
 http://curl.haxx.se/mail/lib-2013-05/0122.html


 Best regards,
 thanks
 ===
 YAMADA Yasuharu
 ACCESS CO., LTD.
 yasuharu.yam...@access-company.com



 2013/6/26 xi xi geekx...@gmail.com

 I've been reading the cookie related codes in libcurl. And it seems that
 there are no libcurl APIs to delete expired cookies.

 CURLOPT_COOKIEFILE option just reads in those linked cookie fileswithout 
 checking expire time.
 CURLOPT_COOKIEJAR option writes out all cookies without checking expire
 time.

 It seems that expire time is checked only when libcurl selects outgoing
 cookies during the sending of a HTTP response.

 As mentioned above, all expired persistant cookies will be stored in the
 CURLOPT_COOKIEJAR file even there are useless and invalid. It seems that
 this file will get bigger and bigger. So will this become a problem?


 Thanks,
 With BR
 xixi

 ---
 List admin: http://cool.haxx.se/list/listinfo/curl-library
 Etiquette:  http://curl.haxx.se/mail/etiquette.html



 .

 
 The contents of this e-mail message and any attachments are confidential and 
 are intended solely for the addressee. The information may also be legally 
 privileged.
 This transmission is sent in trust, and the sole purpose of delivery to the 
 intended recipient. If you have received this transmission in error, any use, 
 reproduction or dissemination of this transmission is strictly prohibited.
 If you are not the intended recipient, please immediately notify the sender 
 by reply e-mailer and delete this message and its attachments, if any.
 Thank you for your cooperation.
 



 ---
 List admin: http://cool.haxx.se/list/listinfo/curl-library
 Etiquette:  http://curl.haxx.se/mail/etiquette.html

---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Re: any libcurl API to delete expired cookies?

2013-06-27 Thread Daniel Stenberg

On Thu, 27 Jun 2013, YAMADA Yasuharu wrote:

When I contributed a patch of [new feature] Maximum limitation of cookies, 
the patch includes a feature of deleting expired cookie.


Right, it didn't get in before the feature-freeze and I've not yet tried to 
get it done since the release. Is the last posted version still fine?


I think the feature of removing expired cookies should be separate from the 
one that limits the total amount of cookies. I'm convinced there are people 
who might want that expiring feature without the max limit set.


--

 / daniel.haxx.se
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Re: any libcurl API to delete expired cookies?

2013-06-27 Thread YAMADA Yasuharu
2013/6/28 Daniel Stenberg dan...@haxx.se

 On Thu, 27 Jun 2013, YAMADA Yasuharu wrote:

  When I contributed a patch of [new feature] Maximum limitation of
 cookies, the patch includes a feature of deleting expired cookie.


 Right, it didn't get in before the feature-freeze and I've not yet tried
 to get it done since the release. Is the last posted version still fine?


Yes I think the last posted version still fine.


 I think the feature of removing expired cookies should be separate from
 the one that limits the total amount of cookies. I'm convinced there are
 people who might want that expiring feature without the max limit set.


I quarry expired cookies patch from my  [new feature] Maximum limitation
of cookies patch.
Please check.

-- 
.


The contents of this e-mail message and any attachments are confidential and 
are intended solely for the addressee. The information may also be legally 
privileged. 
This transmission is sent in trust, and the sole purpose of delivery to the 
intended recipient. If you have received this transmission in error, any use, 
reproduction or dissemination of this transmission is strictly prohibited. 
If you are not the intended recipient, please immediately notify the sender by 
reply e-mailer and delete this message and its attachments, if any.
Thank you for your cooperation.



expired_cookie.patch
Description: Binary data
---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Re: any libcurl API to delete expired cookies?

2013-06-26 Thread YAMADA Yasuharu
Hi xi,

When I contributed a patch of [new feature] Maximum limitation of
cookies, the patch includes a feature of deleting expired cookie.
I think the new feature is not loaded.

See these mails and remove_expired() function.
http://curl.haxx.se/mail/lib-2013-04/0381.html
http://curl.haxx.se/mail/lib-2013-05/0010.html
http://curl.haxx.se/mail/lib-2013-05/0048.html
http://curl.haxx.se/mail/lib-2013-05/0074.html
http://curl.haxx.se/mail/lib-2013-05/0075.html
http://curl.haxx.se/mail/lib-2013-05/0122.html


Best regards,
thanks
===
YAMADA Yasuharu
ACCESS CO., LTD.
yasuharu.yam...@access-company.com



2013/6/26 xi xi geekx...@gmail.com

 I've been reading the cookie related codes in libcurl. And it seems that
 there are no libcurl APIs to delete expired cookies.

 CURLOPT_COOKIEFILE option just reads in those linked cookie files without
 checking expire time.
 CURLOPT_COOKIEJAR option writes out all cookies without checking expire
 time.

 It seems that expire time is checked only when libcurl selects outgoing
 cookies during the sending of a HTTP response.

 As mentioned above, all expired persistant cookies will be stored in the
 CURLOPT_COOKIEJAR file even there are useless and invalid. It seems that
 this file will get bigger and bigger. So will this become a problem?


 Thanks,
 With BR
 xixi

 ---
 List admin: http://cool.haxx.se/list/listinfo/curl-library
 Etiquette:  http://curl.haxx.se/mail/etiquette.html


-- 
.


The contents of this e-mail message and any attachments are confidential and 
are intended solely for the addressee. The information may also be legally 
privileged. 
This transmission is sent in trust, and the sole purpose of delivery to the 
intended recipient. If you have received this transmission in error, any use, 
reproduction or dissemination of this transmission is strictly prohibited. 
If you are not the intended recipient, please immediately notify the sender by 
reply e-mailer and delete this message and its attachments, if any.
Thank you for your cooperation.

---
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html