- ss >> size;
- char* buf2 = new char[size+1];
- if (is.readsome(buf2, size)) {
- m.body = buf2;
- }
- delete buf2[];
+ to(m.headers["Content-Length"], size);
+ char* const buf2 = new char[size+1];
+ if (is.readsome(buf2, size) == size) {
+ // Agrego fin de string porque el readsome no lo hace.
+ buf2[size] = '\0';
+ m.set_body(buf2);
+ } // TODO else dar error?
+ delete []buf2;