@@ -18316,17 +18316,13 @@ function extend_response(PROTO) {
18316
18316
return $image_nocache ( res ) ;
18317
18317
18318
18318
var req = this . req ;
18319
- ! req . $key && ( req . $key = createTemporaryKey ( req ) ) ;
18319
+ if ( ! req . $key )
18320
+ req . $key = createTemporaryKey ( req , 'timg_' ) ;
18320
18321
18321
- if ( F . temporary . notfound [ req . $key ] ) {
18322
- DEBUG && ( F . temporary . notfound [ req . $key ] = undefined ) ;
18323
- if ( ! F . routes . filesfallback || ! F . routes . filesfallback ( req , res ) )
18324
- res . throw404 ( ) ;
18325
- return res ;
18326
- }
18322
+ var key = req . $key ;
18327
18323
18328
- var key = req . $key || createTemporaryKey ( req ) ;
18329
18324
if ( F . temporary . notfound [ key ] ) {
18325
+ DEBUG && ( F . temporary . notfound [ key ] = undefined ) ;
18330
18326
if ( ! F . routes . filesfallback || ! F . routes . filesfallback ( req , res ) )
18331
18327
res . throw404 ( ) ;
18332
18328
return res ;
@@ -18342,7 +18338,7 @@ function extend_response(PROTO) {
18342
18338
return res ;
18343
18339
}
18344
18340
18345
- if ( F . temporary . processing [ req . $ key] ) {
18341
+ if ( F . temporary . processing [ key ] ) {
18346
18342
if ( req . processing > CONF . default_request_timeout ) {
18347
18343
res . throw408 ( ) ;
18348
18344
} else {
@@ -18763,6 +18759,7 @@ function $image_filename(exists, size, isFile, stats, res) {
18763
18759
}
18764
18760
18765
18761
F . stats . response . image ++ ;
18762
+
18766
18763
image . save ( options . name , function ( err ) {
18767
18764
18768
18765
delete F . temporary . processing [ req . $key ] ;
@@ -18893,8 +18890,8 @@ function fsStreamRead(filename, options, callback, res) {
18893
18890
* @param {ServerRequest or String } req
18894
18891
* @return {String }
18895
18892
*/
18896
- function createTemporaryKey ( req ) {
18897
- return ( req . uri ? req . uri . pathname : req ) . replace ( REG_TEMPORARY , '- ' ) . substring ( 1 ) ;
18893
+ function createTemporaryKey ( req , plus ) {
18894
+ return ( plus || '' ) + ( req . uri ? req . uri . pathname : req ) . replace ( REG_TEMPORARY , '_ ' ) . substring ( 1 ) ;
18898
18895
}
18899
18896
18900
18897
F . createTemporaryKey = createTemporaryKey ;
0 commit comments