From cf071218321654e34704c563fed1c06080fda837 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Fri, 24 Aug 2012 17:36:57 -0400 Subject: [PATCH] idk --- http.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/http.d b/http.d index a8ced9a..7c5ce08 100644 --- a/http.d +++ b/http.d @@ -209,7 +209,10 @@ body { return readln(); } auto ret = buffer[0 .. idx + 2]; // + the \r\n - buffer = buffer[idx + 2 .. $]; + if(idx + 2 < buffer.length) + buffer = buffer[idx + 2 .. $]; + else + buffer = null; return ret; }