Error Replies to POST messages

From: Michael Kaplan <michael.a.kaplan_at_gmail.com>
Date: Tue, 22 Jul 2008 10:56:36 -0400

Hi,

I am trying to filter POST messages seen in Squid that do not follow my
application specifications. When a POST is observed that misuses the
header, I would like to send a a custom error page to the host which
would be displayed in the browser. I've added the appropriate
enumeration for the error page as well as the error page definition
within Squid. I then added code to the clientProcessRequest function in
client_side.cc to detect the erroneous POST, and then followed the
convention of generating reply context, set reply to error, etc. Using
Wireshark, I was able to verify that the error page was indeed sent to
the host, however, IE just displayed a default error page, not showing
the custom error page that I generated.

Interestingly if i change my code to react to GET instead of POST, my
custom error page DOES display properly. So I'm wondering if it is an
issue with the POST protocol. Perhaps IE is not expecting HTML in
response to a POST?

Has anyone encountered or tried such a thing?

Thanks,
Mike
Received on Tue Jul 22 2008 - 14:56:47 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 23 2008 - 12:00:07 MDT