At 01:33 PM 4/20/2005, Ivan Barrera A. wrote: >William A. Rowe, Jr. wrote: >>At 11:23 AM 4/20/2005, Ivan Barrera A. wrote: >> >>>>>Ok.. i tought about that, but the problem arises when i need to check >>>>>every byte. >>>>>Why ? , because my input filter is getting control over when a line is >>>>>entered. With a little perl script, i'm opening a socket and putting the >>>>>same char over and over, with 2 seconds of delay between them. As i >>>>>never put a CR-LF, my mod never gets the control to see this delay :( >>>> >>>>I don't think an input filter is the appropriate place to do time out >>>>checks. >>> >>>I also think that.. but then.. where ??? >> >>You should reimplement the core filter, which will allow you to drive >>network socket activity, even if mod_ssl is in place. > >i was afraid you might say that :)
It's not nearly as difficult as you might imagine, took me about three days for mod_ftp's core filter replacement (had to poll both the data and control sockets.) Steal liberally from the core socket implementation. Whatever you do - do NOT READ BYTE AT A TIME, unless you want your 'solution' to be more toxic than the cure. Simply set a low-threshold timeout, and as an early poster pointed out, compare the request time with the accumulated time each time that the read pops.
