From 3c985840f1b394ca9ec43412d086ea9ca6cd1ddb Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Tue, 24 Aug 2010 09:43:47 +0000 Subject: return 400 Bad Request for unparseable range request. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@988450 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_db.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 062cf320..17b27b13 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -1059,6 +1059,8 @@ db_attachment_req(Req, _Db, _DocId, _FileNameParts) -> parse_ranges(undefined, Len) -> undefined; +parse_ranges(fail, Len) -> + throw(bad_request); parse_ranges(Ranges, Len) -> parse_ranges(Ranges, Len, []). -- cgit v1.2.3