commit 544c8a1fa7410bfd840d4f2beba8a7fbb1f5a3c2 parent a01fcd360f310a1f2f466434498799a6b66e06ac Author: Simon Kornblith <simon@simonster.com> Date: Mon, 13 Feb 2012 03:13:28 -0500 Send Content-Type even when body is empty Diffstat:
| M | chrome/content/zotero/xpcom/server.js | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js @@ -303,10 +303,11 @@ Zotero.Server.DataListener.prototype._generateResponse = function(status, conten } } + if(contentType) { + response += "Content-Type: "+contentType+"\r\n"; + } + if(body) { - if(contentType) { - response += "Content-Type: "+contentType+"\r\n"; - } response += "\r\n"+body; } else { response += "Content-Length: 0\r\n\r\n";