Special-cased OS/2 out of the Netscape-abort-on-404-in-js problem in
authorDavid Schmidt <david__schmidt@users.sourceforge.net>
Mon, 22 Oct 2001 15:33:56 +0000 (15:33 +0000)
committerDavid Schmidt <david__schmidt@users.sourceforge.net>
Mon, 22 Oct 2001 15:33:56 +0000 (15:33 +0000)
filters.c.  Added a FIXME in front of the offending code.  I'll gladly
put in a better/more robust fix for all parties if one is presented...
It seems that just returning 200 instead of 404 would pretty much fix
it for everyone, but I don't know all the history of the problem.

filters.c
miscutil.c

index e30a24c..a30a793 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,4 +1,4 @@
-const char filters_rcs[] = "$Id: filters.c,v 1.35 2001/10/07 15:41:23 oes Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.36 2001/10/10 16:44:16 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
@@ -38,6 +38,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.35 2001/10/07 15:41:23 oes Exp $"
  *
  * Revisions   :
  *    $Log: filters.c,v $
  *
  * Revisions   :
  *    $Log: filters.c,v $
+ *    Revision 1.36  2001/10/10 16:44:16  oes
+ *    Added match_portlist function
+ *
  *    Revision 1.35  2001/10/07 15:41:23  oes
  *    Replaced 6 boolean members of csp with one bitmap (csp->flags)
  *
  *    Revision 1.35  2001/10/07 15:41:23  oes
  *    Replaced 6 boolean members of csp with one bitmap (csp->flags)
  *
@@ -647,7 +650,19 @@ struct http_response *block_url(struct client_state *csp)
       rsp->body = template_load(csp, "blocked");
       template_fill(&rsp->body, exports);
       free_map(exports);
       rsp->body = template_load(csp, "blocked");
       template_fill(&rsp->body, exports);
       free_map(exports);
-  
+
+      /* FIXME */
+#ifdef __EMX__
+      /*
+       * The entire OS/2 community will hit the stupid Netscape bug
+       * (all three of us! :-) so we'll just keep ourselves out
+       * of this contentious debate and special-case ourselves.
+       * The problem is... a this point in parsing, we don't know
+       * what the csp->http->user_agent is (yet).  So we can't use
+       * it to decide if we should work around the NS bug or not.
+       */
+      rsp->status = strdup("200 Request for blocked URL"); 
+#else
       /*
        * Workaround for stupid Netscape bug which prevents
        * pages from being displayed if loading a referenced
       /*
        * Workaround for stupid Netscape bug which prevents
        * pages from being displayed if loading a referenced
@@ -665,7 +680,7 @@ struct http_response *block_url(struct client_state *csp)
       {
          rsp->status = strdup("404 Request for blocked URL"); 
       }
       {
          rsp->status = strdup("404 Request for blocked URL"); 
       }
-
+#endif /* __EMX__ */
    }
 
    return(finish_http_response(rsp));
    }
 
    return(finish_http_response(rsp));
index 49e19b0..5989912 100644 (file)
@@ -1,4 +1,4 @@
-const char miscutil_rcs[] = "$Id: miscutil.c,v 1.18 2001/09/20 13:33:43 steudten Exp $";
+const char miscutil_rcs[] = "$Id: miscutil.c,v 1.19 2001/10/14 22:02:57 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/miscutil.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/miscutil.c,v $
@@ -36,6 +36,10 @@ const char miscutil_rcs[] = "$Id: miscutil.c,v 1.18 2001/09/20 13:33:43 steudten
  *
  * Revisions   :
  *    $Log: miscutil.c,v $
  *
  * Revisions   :
  *    $Log: miscutil.c,v $
+ *    Revision 1.19  2001/10/14 22:02:57  jongfoster
+ *    New function string_append() which is like strsav(), but running
+ *    out of memory isn't automatically FATAL.
+ *
  *    Revision 1.18  2001/09/20 13:33:43  steudten
  *
  *    change long to int as return value in hash_string(). Remember the wraparound
  *    Revision 1.18  2001/09/20 13:33:43  steudten
  *
  *    change long to int as return value in hash_string(). Remember the wraparound
@@ -410,7 +414,7 @@ char *chomp(char *string)
  *********************************************************************/
 char *strsav(char *old, const char *text_to_append)
 {
  *********************************************************************/
 char *strsav(char *old, const char *text_to_append)
 {
-   int old_len, new_len;
+   int old_len, new_len = 0;
    char *p;
 
    if (( text_to_append == NULL) || (*text_to_append == '\0'))
    char *p;
 
    if (( text_to_append == NULL) || (*text_to_append == '\0'))