Re: URL filtering using LSP
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Sun, 30 Sep 2007 13:28:05 -0700
Tom pretty much gave you the blow by blow account.
I just wanted to clarify that you don't drop incoming data,
only the outgoing request. E.g. you drop in WSPSend, not
in WSPRecv.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
<andy.y.huang@xxxxxxxxx> wrote in message
news:1191007090.594522.310170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Sep 28, 12:01 pm, "Alexander Nickolov" <agnicko...@xxxxxxxx> wrote:
This is a response, so naturally you _don't_ send it - you
_return_ it. E.g. in your WSPRecv implementation. Wait
until the entire request has been sent (might be a few sends
on the client part) and be sure to drop all the data, then
mark the socket as readable and return your own response
from WSPRecv. If you want to close the socket, be sure
to pass the Connection: close header in the response and
then close the socket after you deliver the entire response.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnicko...@xxxxxxxx
MVP VC FAQ:http://vcfaq.mvps.org
=====================================
<andy.y.hu...@xxxxxxxxx> wrote in message
news:1190994761.469443.133900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Sep 27, 6:03 pm, "Alexander Nickolov" <agnicko...@xxxxxxxx> wrote:
Ideally you should be returning a 403 Forbidden HTTP reponse
instead of closing the socket. This will let the browser properly
display a page with the Forbidden message. You can return an
HTML page with 403 and the browser will display it.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnicko...@xxxxxxxx
MVP VC FAQ:http://vcfaq.mvps.org
=====================================
<andy.y.hu...@xxxxxxxxx> wrote in message
news:1190921236.771571.193040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am trying to do outbound URL filtering using LSP, basically I
check outbound HTTP request from WSPSend and if I find the URL that
needs to be blocked, then I call WSPCloseSocket and return the error
code from that call, that works fine with Firefox, but for IE, it
will display "Internet Explorer cannot display the webpage". Is it
possible not showing this page after blocking and still shows the
previous page?
Anything I should change in the code, such as return different error
code, set
lpErrno parameter to specific Winsock error code? TIA.- Hide quoted
text -
- Show quoted text -
Thx. How do I send HTTP 403 response? through the socket from WSPSend
or create a new socket? Also where should I send the response, I tried
sending HTTP 403 response by calling WSPSend with the socket provided
by previous WSPSend, it doesn't work. Any advise will be greatly
appreciated.- Hide quoted text -
- Show quoted text -
I am confused. So You are suggesting I drop the response from the
blocked web site in the WSPRecv and sends HTTP 403 to client. But how
do I know which WSPRecv needs to be dropped? Is it possible to send
HTTP 403 in the WSPSend because in it I can know for sure if the URL
needs to be blocked? What is the exact flow? TIA.
.
- References:
- URL filtering using LSP
- From: andy.y.huang@xxxxxxxxx
- Re: URL filtering using LSP
- From: Alexander Nickolov
- Re: URL filtering using LSP
- From: andy.y.huang@xxxxxxxxx
- Re: URL filtering using LSP
- From: Alexander Nickolov
- Re: URL filtering using LSP
- From: andy.y.huang@xxxxxxxxx
- URL filtering using LSP
- Prev by Date: Process created by telnet session shows no windows, why ?
- Previous by thread: Re: URL filtering using LSP
- Next by thread: Uploading & posting large files in chunks...
- Index(es):
Relevant Pages
|
Loading