Package: gotmail
Version: 0.8.9-1
Severity: normal
Tags: patch

It seems that hotmail drops the support for numbered pages when your
account has a number of messages, so gotmail goes on downloading the
first page, guessing that always there are more pages to download.

I made a small patch that changes the folder page download method:
instead of using numbered pages, it searches for the "next page" button
and follows it. This way, it works with the usual behaviour and with
this special one.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (901, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-3-686 (SMP w/2 CPU cores)
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gotmail depends on:
ii  curl                          7.15.5-1   Get a file from an HTTP, HTTPS, FT
ii  liburi-perl                   1.35-2     Manipulates and accesses URI strin
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 
ii  perl-modules [libnet-perl]    5.8.8-7    Core Perl modules

gotmail recommends no packages.

-- no debconf information
--- /usr/bin/gotmail    2006-04-25 21:25:38.000000000 -0300
+++ gotmail     2007-05-22 02:40:42.000000000 -0300
@@ -1180,13 +1180,16 @@
        my $still_a_page_to_go = 1;
        my $start_line_of_nextpage_search = 0;
        my @folder = ();
+       my $pageid = "page=0";
 
        while ($still_a_page_to_go) {
                $still_a_page_to_go = 0;
          # Get the messages in whatever order Hotmail says we should
-         push @folder,getPage("http://$host/cgi-bin/HoTMaiL?$url\&page=$page";, 
"", 1, 1, 0);
+         push @folder,getPage("http://$host/cgi-bin/HoTMaiL?$url\&$pageid";, 
"", 1, 1, 0);
          for (my 
$line_nr=$start_line_of_nextpage_search;$line_nr<@folder;$line_nr++) {
-                 if ($folder[$line_nr] =~ m/title="$nextpage_string"/) {
+#                if ($folder[$line_nr] =~ m/title="$nextpage_string"/) {
+               if($folder[$line_nr] =~ m/a href="javascript:HM\('([^']+)'\)" 
title="$nextpage_string"/) {
+                               $pageid = $1;
              $start_line_of_nextpage_search = $line_nr + 1;
                          $still_a_page_to_go = 1;
                                $page++;

Reply via email to