totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

transfer bug in 3.4.6 #772

Closed sersh88 closed 3 years ago

sersh88 commented 3 years ago

Hello, In 3.4.6 version only first request to controller with .cancel().transfer() will be served. All other will return 404. Reproduce with this code as default controller:

exports.install = function() {
    ROUTE('/*', transfer);
    ROUTE('/=serve-base', base);
};

function transfer() {
    this.cancel().transfer('/=serve-base')
}

function base() {
    this.content('test', 'text/html')
}

Try to go to any url, like /blablabla. First request will output test, all subsequent - 404 error. It's wrong cache in F.temporary.other I guess.

petersirka commented 3 years ago

Hi @sersh88, yes there was a bug. I have fixed it.