Android phone can't get ESP8266WebServer page if Content-Length > 1460
The solution is to add the following line to platformio.ini:

build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY




I noticed that the same sketch works without a problem when building with the Arduino IDE, so I checked the differences in building with platformio and the Arduino IDE.

Turns out the relevant difference is that the Arduino IDE uses lwIP 2 by default, while platformio uses 1.4, which seems to have this bug (the same bug appears when using the Arduino IDE with lwIP 1.4).

The build flag above tells platformio to use lwIP v2.