Wondering if that would change the environment context, thus to reset NS headers too, I've moved the whole custom chunk of code to a /tcl library file, wrapping the request post within a custom ad_proc however, ad_form context remained.
Currently, within on_submit block there's only a line calling the ad_proc, as in:
...
} -on_submit {
qt::lunaapi::upload_luna -file [ns_queryget upload_file.tmpfile]
db_transaction {
...
logs are bellow
[17/Jan/2021:14:33:55][28167.7efbf356f700][-conn:qonteo:default:1:25-] Notice: Running ad_proc qt::lunapai::upload_luna
[17/Jan/2021:14:33:55][28167.7efbf3d70700][-conn:qonteo:default:0:26-] Notice: HEADER
: t0
[17/Jan/2021:14:33:55][28167.7efbf3d70700][-conn:qonteo:default:0:26-] Notice: HEADERS 8
[17/Jan/2021:14:33:55][28167.7efbf3d70700][-conn:qonteo:default:0:26-] Notice: Host dashboard.qonteo.com X-Real-IP 192.199.241.132 Connection close Content-Length 16925 Content-type application/x-www-form-urlencoded Content-Type image/jpeg User-Agent NaviServer/4.99.19
[17/Jan/2021:14:33:55][28167.7efbf3d70700][-conn:qonteo:default:0:26-] Notice: BODY
: \xc3\xbf\xc3\x98\xc3\xbf\xc3\xa0\xc0\x80\x10JFIF\xc0\x80\x01\x01\x01\xc0\x80H\xc0\x80H\xc0\x80\xc0\x80\xc3\xbf\xc3\x9b\xc0\x80C\xc0\x80\x03\x02\x02\x03\x02\x02\x03\x03\x03\x03\x04\x03\x03\x04\x05\x08\x05\x05\x04\x04\x05
: \x07\x07\x06\x08\x0c
: \x0c\x0c\x0b
: \x0b\x0b\x0d\x0e\x12\x10\x0d\x0e\x11\x0e\x0b\x0b\x10\x16\x10\x11\x13\x14\x15\x15\x15\x0c\x0f\x17\x18\x16\x14\x18\x12\x14\x15\x14\xc3\xbf\xc3\x9b\xc0\x80C\x01\x03\x04\x04\x05\x04\x05\x09\x05\x05\x09\