From 0a53b85370a14b77571db427fe22385f58f02ebe Mon Sep 17 00:00:00 2001 From: oes Date: Wed, 25 Jul 2001 17:22:51 +0000 Subject: [PATCH] Added workaround for Netscape bug that prevents display of page when loading a component fails. --- filters.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/filters.c b/filters.c index c1ed95d8..a3a523ca 100644 --- a/filters.c +++ b/filters.c @@ -1,7 +1,7 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.22 2001/07/18 12:29:34 oes Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.23 2001/07/23 13:40:12 oes Exp $"; /********************************************************************* * - * File : $Source: /cvsroot/ijbswa//current/filters.c,v $ + * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ * * Purpose : Declares functions to parse/crunch headers and pages. * Functions declared include: @@ -38,6 +38,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.22 2001/07/18 12:29:34 oes Exp $" * * Revisions : * $Log: filters.c,v $ + * Revision 1.23 2001/07/23 13:40:12 oes + * Fixed bug that caused document body to be dropped when pcrs joblist was empty. + * * Revision 1.22 2001/07/18 12:29:34 oes * - Made gif_deanimate_response respect * csp->action->string[ACTION_STRING_DEANIMATE] @@ -506,7 +509,21 @@ struct http_response *block_url(struct client_state *csp) rsp->body = fill_template(csp, "blocked", exports); free_map(exports); - rsp->status = strdup("403 Request for blocked URL"); + /* + * Workaround for stupid Netscape bug which prevents + * pages from being displayed if loading a referenced + * JavaScript or style sheet fails. So make it appear + * as if it succeeded. + */ + if (csp->http->user_agent && !strncmpic(csp->http->user_agent, "mozilla", 7)) + { + rsp->status = strdup("200 Request for blocked URL"); + } + else + { + rsp->status = strdup("404 Request for blocked URL"); + } + } return(finish_http_response(rsp)); -- 2.39.2