Hi,
this is Ambrose at acli@ada.dhs.org again.
There was a bug in my fm.h patch that prevents my.yahoo.co.jp to work.
Rather than fix that bug, I fixed cookie.c instead to implement
(hopefully) correct number-of-dots counting for version 0 cookies.
The correction (relative to my previous patch) is as follows:
diff -ur w3m-0.1.9.jis/cookie.c w3m-0.1.9.jis.patch1/cookie.c
--- w3m-0.1.9.jis/cookie.c Fri Apr 28 23:28:57 2000
+++ w3m-0.1.9.jis.patch1/cookie.c Wed May 3 23:45:31 2000
@@ -340,13 +340,25 @@
if (!(dp = domain_or_tail_match(domainname, domain->ptr, version)))
COOKIE_ERROR(version? COO_EDOM: COO_ETAIL);
if (version == 0) {
- for (sdomain = special_domain; *sdomain; sdomain++) {
- int offset = domain->length - strlen(*sdomain);
- if (offset >= 0 && strcasecmp(*sdomain, &domain->ptr[offset]) == 0)
- break;
+ /* count the number of dots */
+ int i;
+ int n;
+ for (i = 0; i < domain->length; i += 1) {
+ if (domain->ptr[i] == '.')
+ n += 1;
}
- if (!*sdomain && !nodots(domainname, dp))
+ if (n < 2) {
COOKIE_ERROR(COO_ESPECIAL);
+ } else if (n == 2) {
+ int ok = 0;
+ for (sdomain = special_domain; !ok && *sdomain; sdomain++) {
+ int offset = domain->length - strlen(*sdomain);
+ if (offset >= 0 && strcasecmp(*sdomain, &domain->ptr[offset]) == 0)
+ ok = 1;
+ }
+ if (!ok)
+ COOKIE_ERROR(COO_ESPECIAL);
+ }
}
else {
/* RFC 2109 s. 4.3.2 case 4 */
-- Ambrose Li <ai337@freenet.toronto.on.ca> http://trends.ca/~acli/"A good style should show no sign of effort; what is written should seem a happy accident." -- Somerset Maugham.
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:43 CDT