Maybe fix large file downloads
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				/ Build the server (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	/ Build the server (push) Has been cancelled
				
			This commit is contained in:
		@@ -58,6 +58,7 @@ void Server::download(const std::shared_ptr<restbed::Session> &s) {
 | 
				
			|||||||
                    restbed::Bytes buf(1024*1024*4, 0);
 | 
					                    restbed::Bytes buf(1024*1024*4, 0);
 | 
				
			||||||
                    std::ifstream f{user->user_dir / std::to_string(node->id)};
 | 
					                    std::ifstream f{user->user_dir / std::to_string(node->id)};
 | 
				
			||||||
                    while (!f.eof()) {
 | 
					                    while (!f.eof()) {
 | 
				
			||||||
 | 
					                        buf.resize(buf.capacity());
 | 
				
			||||||
                        f.read((char*)buf.data(), buf.size());
 | 
					                        f.read((char*)buf.data(), buf.size());
 | 
				
			||||||
                        buf.resize(f.gcount());
 | 
					                        buf.resize(f.gcount());
 | 
				
			||||||
                        s->yield(buf);
 | 
					                        s->yield(buf);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user