A minor change with a big ripple effect

By: John Kaster

Abstract: Slight differences in web servers can make a big difference in end user experience

On July 22nd, 2004 a bad hard drive on the server (bdnamd) hosting CodeCentral prompted a move to a temporary new server (bdntv). Bdnamd was running Borland Enterprise Server 5.2, with Apache as its web server component. Bdntv is running Windows Server 2003 and IIS 6.

CodeCentral is primarily a Delphi 7 CGI application, and some parts of it needed to be recompiled with this Windows Server 2003 compatibility update released in Delphi 7 Update 1, so the CGIs would work correctly on bdntv. However, there are still some memory overwrite issues affecting the search engine, so I'm working on replacing that specific functionality with an ASP.NET page that will also significantly improve the CodeCentral search options.

After I moved CodeCentral, users then started reporting on the CodeCentral newsgroup that downloads were broken. It took me about two hours of googling and fiddling around with different test scenarios to isolate and fix the problem. The symptom is discussed here, and my cure for it was to re-implement the way users are redirected to the CodeCentral downloads, so the response content from the request for download directs the browser to the redirect, rather than IIS 6 doing the redirect itself.

This redirect is done by using an html metatag that directs the web browser to another site. Here's my template for the Delphi webbroker component property page producer, a component I wrote about in my Kylix book.


<html>
<head>
<title>Borland CodeCentral Download Redirector</title>
<meta http-equiv="refresh" content="0;url=<#= result=dlredir>">
</head>

<body>
<!--
<script language="javascript">
function goToURL()
{window.location.href="<#= result=dlredir>";}
window.setTimeout('goToURL()',10);
</script>
<p>If you don't get redirected automatically, you can click on
<a href="<#= result=dlredir>">
this link</a> for the download</p>
-->
</body>
</html>

The web broker template also includes (commented out between the <!-- and --> markers) the JavaScript to accomplish the same redirect, if you're using a browser that ignores the metatag. The appropriate download URL is substituted for <#= result=dlredir> when the template is evaluated at runtime.

I've tested the new download procedure (my apologies for its ugliness) on IE 6 SP1, Mozilla 1.7x, and FireFox 0.9.2 and it is working with all of them. Hopefully I'll be able to find a cleaner resolution of this issue soon, or get bdnamd repaired so it can again host CodeCentral with Borland Enterprise Server.


Server Response from: ETNASC03