]> err.no Git - sope/commitdiff
Fixed 304 handling
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 22 Jul 2005 12:48:53 +0000 (12:48 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 22 Jul 2005 12:48:53 +0000 (12:48 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@932 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/WEExtensions/ChangeLog
sope-appserver/WEExtensions/JSStringTable.m
sope-appserver/WEExtensions/Version

index b7bed0e1d4513cf034e088a80e17efd9fdc3818b..b8fa5897d8fccad844978e52c013cbfe8a871d21 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-22  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * JSStringTable.m: if 'if-none-match' is not set, do not return a 304
+         (v4.5.78)
+
 2005-07-20  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * WEExtensions.xcodeproj: added JSStringTable, bumped framework version
index fac50ae3ed31da318ae497bd7b2c56354e6cd29e..ef8bfa62392b74fba1c9ba5c51a0a952a4def091 100644 (file)
@@ -221,7 +221,7 @@ static NSString *etag = nil;
        for all instances.
     */
     char buf[32];
-    sprintf(buf, "stamp_%d", ((unsigned)time(NULL) - 1121785679));
+    sprintf(buf, "\"stamp_%d\"", ((unsigned)time(NULL) - 1121785679));
     etag = [[NSString alloc] initWithCString:buf];
   }
   
@@ -258,7 +258,7 @@ static NSString *etag = nil;
   /* check preconditions */
   
   s = [[[self context] request] headerForKey:@"if-none-match"];
-  if ([s rangeOfString:etag].length > 0) {
+  if (s && [s rangeOfString:etag].length > 0) {
     /* client already has the proper entity */
     [r setStatus:304 /* Not Modified */];
     return r;
index 765ffcd9d8a333dcbc7ba9a3552d4347477ec26f..847ef478dbd54916006052d7714b56409143c967 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=77
+SUBMINOR_VERSION:=78
 
 # v4.5.76 requires libNGObjWeb v4.5.176
 # v4.5.75 requires libNGObjWeb v4.5.174