Send Content-Type even when body is empty

This commit is contained in:
Simon Kornblith 2012-02-13 03:13:28 -05:00
parent a01fcd360f
commit 544c8a1fa7

View file

@ -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";