+ (void)initialize {
if (etag == nil) {
- etag = [[NSString alloc] initWithFormat:@"\"sope/%i.%i-wep/%03i\"",
+ etag = [[NSString alloc] initWithFormat:@"\"sope/%i.%i-wep+%03i\"",
SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION,
WEP_SUBMINOR_VERSION];
}
/* check preconditions */
- s = [[[self context] request] headerForKey:@"if-none-match"];
- if ([s rangeOfString:etag].length > 0) {
- /* client already has the proper entity */
- [r setStatus:304 /* Not Modified */];
- return r;
+ if ((s = [[[self context] request] headerForKey:@"if-none-match"]) != nil) {
+ if ([s rangeOfString:etag].length > 0) {
+ /* client already has the proper entity */
+ [r setStatus:304 /* Not Modified */];
+ return r;
+ }
}
/* send script */