mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-16 00:21:39 +00:00
Minor fix for handling exceptions while processing request
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@19670 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c568b010ad
commit
05b5fd8bdb
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Jul 02 13:25:00 2004 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* WebServer.m: Fix error response when an exception occurs.
|
||||
|
||||
Thu Jul 01 18:00:00 2004 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* WebServer.m: Make ([setPort:secure:]) return a status.
|
||||
|
|
11
WebServer.m
11
WebServer.m
|
@ -1065,7 +1065,7 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
|
|||
{
|
||||
[self _alert: @"Exception %@, processing %@", localException, request];
|
||||
[response setHeader: @"http"
|
||||
value: @"500 Internal Server Error"
|
||||
value: @"HTTP/1.0 500 Internal Server Error"
|
||||
parameters: nil];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
|
@ -1133,7 +1133,14 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
|
|||
{
|
||||
[out appendData: [hdr rawMimeData]];
|
||||
}
|
||||
[out appendData: raw];
|
||||
if ([raw length] > 0)
|
||||
{
|
||||
[out appendData: raw];
|
||||
}
|
||||
else
|
||||
{
|
||||
[out appendBytes: "\r\n" length: 2]; // Terminate headers
|
||||
}
|
||||
if (_verbose == YES) NSLog(@"Response %@ - %@", session, out);
|
||||
[[session handle] writeInBackgroundAndNotify: out];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue