From cdf9ab1c0e0eead72b710f5e0e63dc93146fb2aa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 May 2015 21:34:16 +0530 Subject: [PATCH] Respond with 201 instead of 200 by default for POST requests --- src/calibre/srv/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/http.py b/src/calibre/srv/http.py index 1360eb95cc..3aa3aeff00 100644 --- a/src/calibre/srv/http.py +++ b/src/calibre/srv/http.py @@ -510,7 +510,7 @@ class HTTPPair(object): # Read and discard any remaining body from the HTTP request self.input_reader.read() if self.status_code is None: - self.status_code = httplib.OK + self.status_code = httplib.CREATED if self.method == 'POST' else httplib.OK try: self.status_code, output = finalize_output(output, self.inheaders, self.outheaders, self.status_code, self.response_protocol is HTTP1, self.method)