From f088c27012c0c49ad47538373d083311dccaf7d9 Mon Sep 17 00:00:00 2001 From: jomo Date: Wed, 3 Feb 2016 02:49:43 +0100 Subject: [PATCH] use '201 Created' when 'status' is 'downloaded' --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index 17c300b..f6279e4 100644 --- a/lib/response.js +++ b/lib/response.js @@ -91,7 +91,7 @@ module.exports = function(request, response, result) { } else { if (result.body) { headers.Etag = etag; - response.writeHead(200, headers); + response.writeHead(result.status === 2 ? 201 : 200, headers); } else { response.writeHead(404, headers); }