/[resiprocate]/main/sip/resiprocate/Security.cxx
ViewVC logotype

Diff of /main/sip/resiprocate/Security.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5213 by daniel, Tue Jul 19 00:40:57 2005 UTC revision 5214 by daniel, Tue Aug 9 18:16:29 2005 UTC
# Line 1857  Line 1857 
1857     BIO_flush(out);       BIO_flush(out);  
1858     BUF_MEM* bufMem;     BUF_MEM* bufMem;
1859     BIO_get_mem_ptr(out, &bufMem);     BIO_get_mem_ptr(out, &bufMem);
1860     BIO_set_close(out, BIO_NOCLOSE);  
1861       int len = bufMem->length;
1862       char* buffer = new char[len];
1863       memcpy(buffer, bufMem->data, len);
1864    
1865       BIO_set_close(out, BIO_CLOSE);
1866     BIO_free(out);     BIO_free(out);
1867    
1868     // parse out the header information and form new body.     // parse out the header information and form new body.
1869     // TODO !jf! this is a really crappy parser - shoudl do proper mime stuff     // TODO !jf! this is a really crappy parser - shoudl do proper mime stuff
1870     ParseBuffer pb(bufMem->data, bufMem->length);     ParseBuffer pb(buffer, len);
1871    
1872     const char* headerStart = pb.position();     const char* headerStart = pb.position();
1873    
# Line 1900  Line 1905 
1905     pb.data(tmp, bodyStart);     pb.data(tmp, bodyStart);
1906     // create contents against body     // create contents against body
1907     Contents* ret = Contents::createContents(contentType, tmp);     Contents* ret = Contents::createContents(contentType, tmp);
1908     ret->addBuffer(bufMem->data);     ret->addBuffer(buffer);
1909        
1910     // pre-parse headers     // pre-parse headers
1911     ParseBuffer headersPb(headerStart, bodyStart-4-headerStart);     ParseBuffer headersPb(headerStart, bodyStart-4-headerStart);

Legend:
Removed from v.5213  
changed lines
  Added in v.5214

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27