couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1032391 - in /couchdb/trunk: share/www/script/test/attachments_multipart.js src/couchdb/couch_httpd_db.erl
Date Sun, 07 Nov 2010 21:08:08 GMT
Author: fdmanana
Date: Sun Nov  7 21:08:08 2010
New Revision: 1032391

URL: http://svn.apache.org/viewvc?rev=1032391&view=rev
Log:
Bug fix: the separator for media types in the 'Accept' header is a comma. The semicolon separates
a media type from its parameters.
A more complete solution, which takes into account Q values, was submitted upstream: https://github.com/mochi/mochiweb/issues/issue/21.


Modified:
    couchdb/trunk/share/www/script/test/attachments_multipart.js
    couchdb/trunk/src/couchdb/couch_httpd_db.erl

Modified: couchdb/trunk/share/www/script/test/attachments_multipart.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/attachments_multipart.js?rev=1032391&r1=1032390&r2=1032391&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/attachments_multipart.js (original)
+++ couchdb/trunk/share/www/script/test/attachments_multipart.js Sun Nov  7 21:08:08 2010
@@ -200,7 +200,7 @@ couchTests.attachments_multipart= functi
   // a certain rev).
   
   xhr = CouchDB.request("GET", "/test_suite_db/multipart?atts_since=[\"" + firstrev + "\"]",
-    {headers:{"accept": "multipart/related,*/*;"}});
+    {headers:{"accept": "multipart/related, */*"}});
   
   T(xhr.status == 200);
   

Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=1032391&r1=1032390&r2=1032391&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_db.erl Sun Nov  7 21:08:08 2010
@@ -600,7 +600,7 @@ db_doc_req(#httpd{method='GET'}=Req, Db,
         {ok, Results} = couch_db:open_doc_revs(Db, DocId, Revs, Options),
         AcceptedTypes = case couch_httpd:header_value(Req, "Accept") of
             undefined       -> [];
-            AcceptHeader    -> string:tokens(AcceptHeader, "; ")
+            AcceptHeader    -> string:tokens(AcceptHeader, ", ")
         end,
         case lists:member("multipart/mixed", AcceptedTypes) of
         false ->



Mime
View raw message