You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2005/08/30 05:34:14 UTC

svn commit: r264690 - in /httpd/mod_mbox/branches/httpd-mbox-if: STATUS module-2.0/mod_mbox_file.c module-2.0/mod_mbox_out.c

Author: maxime
Date: Mon Aug 29 20:34:08 2005
New Revision: 264690

URL: http://svn.apache.org/viewcvs?rev=264690&view=rev
Log:
Fixed the broken Previous by thread link. Some notes about browser
compatibility in the STATUS file.

 * module-2.0/mod_mbox_file.c:
    (fetch_context_msgids): compute threads before touching the head
pointer, or the first message of the MBOX_LIST will be the currently
displayed message, thus making find_prev_thread to think there is no
previous message.

 * module-2.0/mod_mbox_out.c:
    (mbox_static_message_nav): escape message IDs since they can
contain unusual characters leading to 400 Bad Request errors.

 * STATUS:
    (Known Bugs): none remaining ... for the moment ;)
    (Compatibility problems): new section.


Modified:
    httpd/mod_mbox/branches/httpd-mbox-if/STATUS
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c

Modified: httpd/mod_mbox/branches/httpd-mbox-if/STATUS
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/STATUS?rev=264690&r1=264689&r2=264690&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/STATUS (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/STATUS Mon Aug 29 20:34:08 2005
@@ -10,10 +10,6 @@
 
     * Massive bug squashing. [in progress]
 
-Known bugs:
-
-    * Previous by thread links does not work.
-
 ToDo:
 
     * Documentation
@@ -36,3 +32,36 @@
     * When viewing a message, come back to the page we came instead of
       the first page of the choosen listing (without cookie, if
       possible)
+
+Compatibility problems:
+
+    The AJAX browsing interface is only known to work with Gecko based
+    browsers. It has been successfully tested with :
+
+      * Firefox 1.0.4, 1.0.5 and 1.0.6
+      * Firefox Deep Park Alpha 2
+      * Epiphany-browser 1.6.4
+      * Galeon 1.3.21
+
+    Internet Explorer:
+
+      * _msglist is not considered as definied in the
+        drawFullMsgList() function. Still, it should have been set by
+	getMsgList() just before the call to drawFullMsgList().
+      * local variable scope is not supported. the
+        parseMimeStructure() function will *not* work.
+
+    Safari:
+
+      * Browser crashes when calling toggleMessage(). Some debugging
+        did not help locating the bug (sometimes in the
+        toggleMessage() function, sometimes in the
+        buildMessageListEntry() function ...
+
+    Konqueror:
+
+      * KHTML does not support AJAX. Some strange errors related to
+        .innerHTML, but I was not able to reproduce them outside
+        mod_mbox (http://skikda.bulix.org/~sam/ajax/compat.html).
+
+

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c?rev=264690&r1=264689&r2=264690&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c Mon Aug 29 20:34:08 2005
@@ -163,10 +163,13 @@
 
     memset(context, 0, 4*sizeof(char *));
 
-    /* First, set the MBOX_PREV and MBOX_NEXT IDs */
     head = mbox_load_index(r, f, NULL);
-    head = mbox_sort_list(head, MBOX_SORT_DATE);
 
+    /* Compute threads before touching 'head' */
+    threads = calculate_threads(r->pool, head);
+
+    /* First, set the MBOX_PREV and MBOX_NEXT IDs */
+    head = mbox_sort_list(head, MBOX_SORT_DATE);
     while (head && strcmp(msgID, ((Message*)(head->value))->msgID) != 0) {
       prev = head;
       head = head->next;
@@ -181,16 +184,16 @@
     }
 
     /* And the MBOX_PREV_THREAD and MBOX_NEXT_THREAD ones */
-    threads = calculate_threads(r->pool, head);
     if (threads) {
         c = find_prev_thread(r, msgID, threads);
+
 	if (c && c->message) {
 	    context[2] = c->message->msgID;
 	}
 
 	c = find_next_thread(r, msgID, threads);
 	if (c && c->message) {
-	    context[3] = c->message->msgID;
+	  context[3] = c->message->msgID;
 	}
     }
 

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c?rev=264690&r1=264689&r2=264690&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c Mon Aug 29 20:34:08 2005
@@ -842,7 +842,7 @@
     if (context[0]) {
         ap_rprintf(r, "<a href=\"%s/%s\" "
 		   "title=\"Previous by date\">&laquo;</a>",
-		   baseURI, context[0]);
+		   baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[0]));
     }
     else {
         ap_rputs("&laquo;", r);
@@ -855,7 +855,7 @@
     if (context[1]) {
         ap_rprintf(r, "<a href=\"%s/%s\" "
 		   "title=\"Next by date\">&raquo;</a>",
-		   baseURI, context[1]);
+		   baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[1]));
     }
     else {
         ap_rputs("&raquo;", r);
@@ -867,7 +867,7 @@
     if (context[2]) {
         ap_rprintf(r, "<a href=\"%s/%s\" "
 		   "title=\"Previous by thread\">&laquo;</a>",
-		   baseURI, context[2]);
+		   baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[2]));
     }
     else {
         ap_rputs("&laquo;", r);
@@ -880,7 +880,7 @@
     if (context[3]) {
         ap_rprintf(r, "<a href=\"%s/%s\" "
 		   "title=\"Next by thread\">&raquo;</a>",
-		   baseURI, context[3]);
+		   baseURI, URI_ESCAPE_OR_BLANK(r->pool, context[3]));
     }
     else {
         ap_rputs("&raquo;", r);