Need to send a 403 (forbidden) message from proxy to client

imported_nautique

Senior member
Jul 14, 2004
346
0
0
I have create a List that contains URL's that I want to block from the user. Once I search that list and see that the requested URL is in the list, I need to send a 403(forbidden) message. Does anyone know if I can just send a "HTTP/1.0 403 Forbidden" Header back to the client in bytes from my DataOutputStream object??
Anyone have any other suggestions I would appreciate it.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I believe that's all you'd need. To be pretty sure you could just try it and see what the browser does. To be really sure you could read the http spec and check.
You might want to specify a Content-Length: header of 0 as well because the browser probably expects a page still.