Fetch website with ESP8266 and Arduino Pro Mini

I'm trying to fetch a response from a website. Works fine when running the commands directly with the ESP8266 but the response via the Arduino Pro Mini is lacking the whole site...

#include <SoftwareSerial.h>

#define WIFI_RX 8
#define WIFI_TX 9
#define WIFI_ONOFF 2

SoftwareSerial WIFISerial = SoftwareSerial(WIFI_TX,WIFI_RX); //GSM_TX, GSM_RX);

void setup() {
  pinMode(WIFI_ONOFF, OUTPUT);
  digitalWrite(WIFI_ONOFF, HIGH);  
  WIFISerial.begin(9600);
  Serial.begin(4800);
  Serial.println("Setup sequence done...");
}

void loop() {
  String tmp = "";
  WIFISerial.println("AT+CWMODE=1");
  delay(50);
  if(WIFISerial.available()) {
    tmp = WIFISerial.readString();
  }
  Serial.println(tmp);
  WIFISerial.println("AT+CWJAP=\"SSID\",\"PSW\"");
  delay(3000);
  if(WIFISerial.available()) {
    tmp = WIFISerial.readString();
  }
  Serial.println(tmp);
  WIFISerial.println("AT+CIPSTART=\"TCP\",\"www.host.se\",80");
  delay(1000);
  if(WIFISerial.available()) {
    tmp = WIFISerial.readString();
  }
  Serial.println(tmp);
  String cmd = "GET http://www.host.se/upload.php?temp=15 HTTP/1.0\r\n\r\n";
  WIFISerial.print("AT+CIPSEND=");
  WIFISerial.println(cmd.length());
  if(WIFISerial.find(">"))
  {
      WIFISerial.print(cmd);
  }
  delay(3000);
  if(WIFISerial.available()) {
    tmp = WIFISerial.readString();
  }
  Serial.println(tmp);
  Serial.println("Done...");
  delay(40000);
}

Gives following response:

[Vendor:www.ai-thinker.com Version:0.9.2.4]

ready

AT+CWJAP="SSID","PSW"


OK

AT+CIPSTART="TCP","www.host.se",80


OK
Linked

 GET http://www.host.se/upload.php?temp=15 HTTP/1.0


SEND O
Done...

Why doesn't in return the whole site?

  String cmd = "GET http://www.host.se/upload.php?temp=15 HTTP/1.0\r\n\r\n";
  WIFISerial.print("AT+CIPSEND=");
  WIFISerial.println(cmd.length());

You send the AT command with the length of the command as the data. Does that seem reasonable? I'd think that the data would need to be the command, not it's length.

That is actually the correct way to initiate the AT+CIPSEND command, it starts with the length of the command and then followed by the actual command on retrieval of the >-sign.

With AltSoftSerial, a series of WIFISerial.flush() and additional delays I was able to fix the problem. However, I find the Software Serial highly unstable. I only need to make a minor change to the code, can even be unrelated to the actual Software Serial, and it will break again. How should it be treated to perform at its best? How often do one need to flush? Any guidelines?

How often do one need to flush?

I flush every time I take a dump.

I never flush a serial stream. Dumping random amounts of unread data (the original implementation of flush()) hardly seems useful. Blocking until the interrupts have cleared the outgoing buffer (the current implementation of flush()) hardly seems useful, either. Unless you are planning on sleeping.

Unless you really need the pins, I would skip using the Pro Mini entirely and just use the ESP8266 with GitHub - esp8266/Arduino: ESP8266 core for Arduino