crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

headersreceived.cc (359B)


      1 #include "httpbuffer"
      2 
      3 bool Httpbuffer::headersreceived() {
      4     PROFILE("Httpbuffer::headersreceived");
      5     
      6     if (bodystart)
      7 	return (true);
      8 
      9     unsigned off;
     10     if ( (off = strfind("\r\n\r\n")) > 0 ) {
     11 	bodystart = off + 4;
     12 	return (true);
     13     }
     14     if ( (off = strfind("\n\n")) > 0 ) {
     15 	bodystart = off + 2;
     16 	return (true);
     17     }
     18     return (false);
     19 }