// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.5 1998/11/11 06:54:21 jgg Exp $
+// $Id: http.cc,v 1.6 1998/11/21 06:09:09 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
0 - File is open,
1 - IMS hit
3 - Unrecoverable error
- 4 - Error with error content page */
+ 4 - Error with error content page
+ 5 - Unrecoverable non-server error (close the connection) */
int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
{
// Not Modified
delete File;
File = new FileFd(Queue->DestFile,FileFd::WriteAny);
if (_error->PendingError() == true)
- return 3;
+ return 5;
FailFile = Queue->DestFile;
FailFd = File->Fd();
if (Srv->In.MD5->AddFD(File->Fd(),Srv->StartPos) == false)
{
_error->Errno("read","Problem hashing file");
- return 3;
+ return 5;
}
lseek(File->Fd(),0,SEEK_END);
}
Fail();
break;
}
+
+ // Hard internal error, kill the connection and fail
+ case 5:
+ {
+ Fail();
+ Server->Close();
+ break;
+ }
// We need to flush the data, the header is like a 404 w/ error text
case 4: