Bilal-S / iis2tomcat

AJP Connector between Internet Information Services (IIS) and Apache Tomcat
http://www.boncode.net/boncode-connector
49 stars 32 forks source link

HTTP custom status text/reason lost from Tomcat to IIS #102

Open kwaschny opened 3 years ago

kwaschny commented 3 years ago

We switched from ISAPI redirector to BonCode (ColdFusion) and now no longer see custom HTTP status text/reason in the response.

We specify a custom status response like this: <cfheader statusCode="404" statusText="Test"> (Should be HttpServletResponse.sendError() behind the curtain.)

With the old ISAPI redirector, the status text/reason is delivered to IIS as 404 Test: image (Screenshot from Chrome Network/Request-Response View)

BonCode however, always returns 404 Not Found. I checked the repo code and was looking for HttpResponse.StatusDescription, but couldn't find anything about status text/reason at all. Is this simply not supported or is there something wrong with the setup on our side?

BonCodeAJP13.settings

<Settings>
    <Port>8012</Port>
    <EnableAdobeMode>True</EnableAdobeMode>
</Settings>

web.config

<system.webServer>
    <httpErrors errorMode="Custom" existingResponse="PassThrough" />
</system.webServer>
Bilal-S commented 3 years ago

@kwaschny You are correct. It looks like we do not look for a statusText just the statusCode is passed along. So this would need to be an enhancement to be made in the future.