- Wed Mar 11, 2015 12:41 am
#11767
In my experience, between one web browser an other have different behavior . One thing may work on firefox but not in chrome or IE. So my conclusion is we need to follow standard HTTP specification.
If we use Chrome, miss content-length will be reported as error. We can check in chrome developer tools console. This as well as android browser. If we miss content-length, android browser sometime will still waiting for data even if the server close the connection.
"Connection: close" is important to inform web browser that the server intend to close the connection after data transmission. If we miss this (we put Connection: keep alive) but the server close the connection, at the first time android browser should work, but not in the second time. In the third time its should work again, but not in fourth time, and so on.