diff --git a/build.gradle b/build.gradle index 866e865..1c0b19f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: "groovy" apply plugin: "maven" group = "com.jdbernard" -version = "3.4" +version = "3.5" repositories { mavenCentral() } diff --git a/src/main/groovy/com/jdbernard/net/HttpContext.groovy b/src/main/groovy/com/jdbernard/net/HttpContext.groovy index 5089b7c..286d762 100644 --- a/src/main/groovy/com/jdbernard/net/HttpContext.groovy +++ b/src/main/groovy/com/jdbernard/net/HttpContext.groovy @@ -102,7 +102,9 @@ public class HttpContext { message.append(requestBody) message.append("\r\n") } - else message.append("\r\n") + else if (method == "POST") { + message.append("Content-Length: 0\r\n\r\n") } + else message.append("\r\n") return message.toString() }