Hi

Apache 1.3
S.u.S.E Linux 5.2

Is anyone familiar with the code behind Apache ?

I'm trying to discover how Apache (1.3) deals with the case where the 
request does not end in CRLFCRLF

I've written a client that can be used to send 'bad' requests to 
Apache. e.g myclient GET 127.0.0.1/index.html\r\n\r\n or whatever

if I send the above with a \n (for example) missing Apache waits 
around for about 5 mins then closes the socket/connection.
I can still make other connections (good and bad) 

I'm trying to write a simple concurrent HTTP/1.0 server. That 
exhibits similar concurrent functionality. I have it working but so 
far I do the following if the request does not contain \r\n\r\n 

int i,j; 
for (i = 0; i < 10000;  i++)
{   
    for(j = 0; j < 100000; j++);
}
      close(sock);
      etc
This is obviously not a very good idea as I can have many 
concurrent processess all (potentialy) doing this processor intensive 
stuff, eventually my old 486 66 is going to slow down to a crawl 
leaving no resources for valid requests.

I have most of the work done and have done extensive testing with 
good requests and  I know the server works in these (good) cases. 

I've had a look at RFC 1945 but there's a lot of it and I may have 
missed something.  I guess this behaviour is to a certain extent 
implementation dependant  Yes/No ??

Does anyone know where abouts the Apache code for the above might be 
lurking on my filesystem??

If not does anyone know of a better/proper way of doing this.

I might even publish the IP address so you can crash it for me.

Cheers
Duncan L.Strang

Reply via email to