Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[2.5.0] [HAProxy] Some responses are shorter than declared in Content-length #5874

@vipo

Description

@vipo

Play Version

2.5.0

Older version (i.e. 2.4.6) works as expected without any problems. So workaround for us is simple: we just downgraded play.

API

Scala 2.11.7

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

Docker image java:8u66-jdk, Mesos, Marathon.

Expected Behavior

Application built on play-netty-server (embedded) works as expected if is called directly (docker exposed port or when you run it locally). It returns csv plain text responses, which size might vary from 55kb to a few megabytes.

We want play 2.5.0 version to work behind LB in the same way as version 2.4.6 does.

Actual Behavior

If we put this application under HAProxy 1.6 load balancing (marathon-lb) some (like 20%) responses (plain/html, plain/text) become truncated (to approx 19kb): it is much shorter than declared in Content-Lenght header. This behavior is reproducible with Chrome (net::ERR_CONTENT_LENGTH_MISMATCH), Firefox (which is quite silent in such situations) and even curl (which also says content is shorter than expected).

HAProxy LB options were tested: keep alive, tunnel, server close -- all with same negative result.

I am pretty sure this issue is related to #5835 which is closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions