HTTP response for web application not working

I have cgi style web application written in c and when post request comes from the server the web application reads the POST request from standard I/O and when it tries to respond on standard I/O the response is not getting out the Digi Embedded Linux box.

Its running on Digi Embedded 5.7 box cme9210js processor.

What is your question? Are you using webserver (which one?) or your own application?

Thank you LeonidM for your attention.Actually the web application can receive POST request from web server () browser as well as kind of Application servers.So the question is how the httpd behaves different when sending HTTP response to web server (HTML content) and when sending HTTP response to Application server (XML url encoded) content.
And HTTP daemon receives/send data to/from web application on standard I/O.