Skip to main content

SAP: Change request body in BSP response

Submitted by Stefan Barsuhn on

I recently needed to modify the body of an HTTP response in a BSP page. Previously, the request was simply returning a status 403. This was done using request->set_status. So I assumed that I simply had to do request->set_cdata to set the HTML body corresponding to the status. But this was incorrect. 

The correct approach was to use me->write (me referring to the BSP page in the DO_REQUEST method). I know too little about BSP to explain why the request and the BSP page are two different objects.

Tags