crossroads

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

replaceheader1.cc (351B)


      1 #include "httpbuffer"
      2 
      3 void Httpbuffer::replaceheader(string const &h) {
      4     PROFILE("Httpbuffer::replacehader(string)");
      5 
      6     unsigned i;
      7     for (i = 0; i < h.size(); i++)
      8 	if (h[i] == ':') {
      9 	    string var = h.substr(0, i);
     10 	    i++;
     11 	    while (isspace(h[i]))
     12 		i++;
     13 	    string val = h.substr(i);
     14 	    replaceheader(var, val);
     15 	    return;
     16 	}
     17 }