comparison Core/HttpServer/MongooseServer.cpp @ 10:27e2bbc11200

Better signal handling
author Administrator@jodogne-w01
date Fri, 20 Jul 2012 11:45:05 +0200
parents 3a584803783e
children 62bd05fe4b7c
comparison
equal deleted inserted replaced
8:3a584803783e 10:27e2bbc11200
337 return PostDataStatus_Failure; 337 return PostDataStatus_Failure;
338 } 338 }
339 } 339 }
340 340
341 typedef boost::find_iterator<std::string::iterator> FindIterator; 341 typedef boost::find_iterator<std::string::iterator> FindIterator;
342 typedef boost::iterator_range<std::string::iterator> Range; 342 typedef boost::iterator_range<char*> Range;
343 343
344 //chunkStore.Print(); 344 //chunkStore.Print();
345 345
346 try 346 try
347 { 347 {
351 it!=FindIterator(); 351 it!=FindIterator();
352 ++it) 352 ++it)
353 { 353 {
354 if (last != FindIterator()) 354 if (last != FindIterator())
355 { 355 {
356 /* Range part(&last->back(), &it->front()); 356 Range part(&last->back(), &it->front());
357 Range content = boost::find_first(part, "\r\n\r\n"); 357 Range content = boost::find_first(part, "\r\n\r\n");
358 if (content != Range()) 358 if (content != Range())
359 { 359 {
360 Range c(&content.back() + 1, &it->front() - 2); 360 Range c(&content.back() + 1, &it->front() - 2);
361 size_t chunkSize = c.size(); 361 size_t chunkSize = c.size();
377 else 377 else
378 { 378 {
379 return chunkStore.Store(completedFile, chunkData, chunkSize, fileName->second, fileSize); 379 return chunkStore.Store(completedFile, chunkData, chunkSize, fileName->second, fileSize);
380 } 380 }
381 } 381 }
382 }*/ 382 }
383 } 383 }
384 384
385 last = it; 385 last = it;
386 } 386 }
387 } 387 }