Skip to content

Render(StatusCode, Object) returning wrong status code in ISAPI dll  #406

Description

@Rafnafnaf

I'm using version 3.1 lithium.

I'm calling the render method overload which accepts a statuscode and an object, and I want to return a 401 with an error object from the ControllerBeforeAction of my base controller.

When doing it with an executable VCL forms app, it works as expected.
When using the same code in an ISAPI dll, published in IIS, the status code is always 200.

I fixed it by using Render(object) and then calling Context.Response.StatusCode := 401

Note that in the log file, the correct status code was displayed for the response, so at first we thought that the problem was with IIS.

Metadata

Metadata

Assignees

Labels

acceptedIssue has been accepted and inserted in a future milestoneneed more info

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions