]> err.no Git - sope/commitdiff
define some default defaults for the simple http parser (when the Defaults.plist...
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 16 Nov 2004 12:49:42 +0000 (12:49 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 16 Nov 2004 12:49:42 +0000 (12:49 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@372 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGObjWeb/ChangeLog
sope-appserver/NGObjWeb/Version
sope-appserver/NGObjWeb/WOSimpleHTTPParser.m
sope-appserver/NGXmlRpc/NGXmlRpcClient.m
xmlrpc_call/README [new file with mode: 0644]

index 9b2429f1e567cee4ee0c23ea517794ec2093b1da..0d307ca8f9e12a9bc0b544fcc4944ff4110604e0 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-05  Helge Hess  <helge.hess@skyrix.com>
+
+       * WOSimpleHTTPParser.m: set a default file boundary size and max upload
+         size if the Defaults.plist was not loaded (eg in xmlrpc_call with
+         WOHTTPConnectionUseSimpleParser) (v4.5.88)
+
 2004-11-15  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v4.5.87
index 3a6ac51c364e1f6fcd8b0d0bb0b05202198f344f..cec1772e5748e0c08912be57e68722c2adc3c631 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=87
+SUBMINOR_VERSION:=88
 
 # v4.5.84  required libNGExtensions v4.5.127
 # v4.3.42  requires libNGExtensions v4.3.116
index 1336f2d963237d082851059d491953d2fd5ad681..595a8ecdf47ae813e5d0043e76892dc1ccb1cff3 100644 (file)
@@ -29,8 +29,8 @@
 static Class NSStringClass  = Nil;
 static BOOL  debugOn        = NO;
 static BOOL  heavyDebugOn   = NO;
-static int   fileIOBoundary = 16384;
-static int   maxUploadSize  = 256 * 1024; /* 256MB */
+static int   fileIOBoundary = 0;
+static int   maxUploadSize  = 0;
 
 + (int)version {
   return 1;
@@ -42,7 +42,12 @@ static int   maxUploadSize  = 256 * 1024; /* 256MB */
   heavyDebugOn   = [ud boolForKey:@"WOSimpleHTTPParserHeavyDebugEnabled"];
   fileIOBoundary = [ud integerForKey:@"WOSimpleHTTPParserFileIOBoundary"];
   maxUploadSize  = [ud integerForKey:@"WOSimpleHTTPParserMaxUploadSizeInKB"];
-
+  
+  if (maxUploadSize == 0)
+    maxUploadSize = 256 * 1024; /* 256MB */
+  if (fileIOBoundary == 0)
+    fileIOBoundary = 16384;
+  
   if (debugOn) {
     NSLog(@"WOSimpleHTTPParser: max-upload-size:  %dKB", maxUploadSize);
     NSLog(@"WOSimpleHTTPParser: file-IO boundary: %d",   fileIOBoundary);
@@ -544,10 +549,12 @@ static NSString *stringForHeaderName(unsigned char *p) {
   }
   else if (self->clen > maxUploadSize*1024) {
     /* entity is too large */
+    NSString *s;
+
+    s = [NSString stringWithFormat:@"The maximum HTTP transaction size was "
+                  @"exceeded (%d vs %d)", self->clen, maxUploadSize * 1024];
     return [NSException exceptionWithName:@"LimitException"
-                       reason:
-                         @"the maximum HTTP transaction size was exceeded"
-                       userInfo:nil];
+                       reason:s userInfo:nil];
   }
   else if (self->clen > fileIOBoundary) {
     /* we are streaming the content to a file and use a memory mapped data */
index cade9f3f820a2fb6ecb4a855a650a2464ebad2e7..01a8d5e0b9256696897b1722d5db14b8d4295fec 100644 (file)
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #include "NGXmlRpcClient.h"
 #include "common.h"
diff --git a/xmlrpc_call/README b/xmlrpc_call/README
new file mode 100644 (file)
index 0000000..cce6a55
--- /dev/null
@@ -0,0 +1,7 @@
+xmlrpc_client
+=============
+
+A shell tool to call XML-RPC web services.
+
+Note: you should set the WOHTTPConnectionUseSimpleParser default to YES to
+      ensure proper HTTP parsing.