Hi

Am 23.04.2018 um 22:36 schrieb PiBa-NL:
> Is there a bug in my script, or is it more likely that 'something' needs
> fixing in the lua api / interaction?

I poked around a bit: The cause in this case is the Content-Length
header. It causes that haproxy does not use chunked encoding for the output.

My suspicion is some kind of "race condition". It looks like that the
applet function does not get scheduled any more, once all data is sent
over the wire and thus the output to stdout is not printed in all cases.

I could not reproduce the issue if I added another `applet:send()` below
the second print_r. I also could not reproduce the issue if the
Content-Length header specifies a length *greater* than the actual
length of the content. I could however reproduce it, if the
Content-Length header specifies a length *smaller* than the actual
length of the content.

Best regards
Tim Düsterhus

Reply via email to