kotlinx.html icon indicating copy to clipboard operation
kotlinx.html copied to clipboard

Response has already been sent

Open Miha-x64 opened this issue 8 years ago • 1 comments
trafficstars

Similar to PHP's 'headers already sent by' :) Can be reproduces by something like

div {
    p()
    classes += "whatever
}

Stack trace contains no my functions, only host's, coroutines', ktor's, etc.

For absolute safety such constructs should be prohibited. For example, DSL function can accept two functions. One will work with attributes, other — with content, and second must be evaluated after first.

Miha-x64 avatar Nov 01 '17 12:11 Miha-x64

This would work well if there is DOM tag consumer: in this case the following works well. Same for React builder. So this is not a mistake that it is not prohibited

cy6erGn0m avatar Nov 03 '17 12:11 cy6erGn0m