Changeset 1110
- Timestamp:
- 06/29/08 16:43:58 (2 months ago)
- Files:
-
- trunk/mango/net/servlet/ServletResponse.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/mango/net/servlet/ServletResponse.d
r1107 r1110 230 230 file = new FileConduit; 231 231 232 try { 232 scope (failure) 233 { 234 sendError (HttpResponses.NotFound); 235 return false; 236 } 237 238 auto log = (cast(ServletContext) context).log; 233 239 if (cache) 234 240 if (cache.get (path, info)) … … 241 247 char[512] tmp = void; 242 248 file.open (context.getResourceAsPath (path, tmp)); 249 scope (exit) 250 file.detach; 243 251 244 252 auto p = Path.parse (path); … … 253 261 buffer.copy (file); 254 262 return true; 255 256 } catch (IOException x)257 {258 sendError (HttpResponses.NotFound);259 }260 finally261 {262 file.detach;263 }264 263 return false; 265 264 }
