setheader1.cc (333B)
1 #include "httpbuffer" 2 3 void Httpbuffer::setheader (string const &h) { 4 PROFILE("Httpbuffer::setheader(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 setheader (var, val); 15 } 16 }