flimzy commented on a change in pull request #237: "Rewrite" section cleanup

 File path: src/api/ddoc/rewrites.rst
 @@ -21,33 +21,40 @@
                array of routing rules or JavaScript function
     Rewrites the specified path by rules defined in the specified design
-    document. The rewrite rules are defined in *array* or *string* field
-    of the design document called ``rewrites``.
-Rewrite section a is stringified function
-    *'Rewrite using JS' feature was introduced in CouchDB 1.7*. If the
-    ``rewrites`` field is a stringified function, query server is used
-    to pre-process and route a request.
-    The function receives truncated version of req object as a single argument
-    and must return object, containing new information about request.
-    Returned object should include properties as:
-    - **path** (*string*): Rewritten path, mandatory if no *code* provided
-    - **query** (*array*): Rewritten query, if omitted original query keys
-      are used
-    - **headers** (*object*): Rewritten headers. If omitted, original
-      request headers are used
-    - **method** (*string*): Method of rewritten request. If omitted,
-      original request method is used
-    - **code** (*number*): Returned code. If provided, request is not rewritten
-      and user immediately receives response with the code
-    - **body** (*string*): Body for POST/PUT requests, or for returning to user
-      if *code* field provided. If POST/PUT request is being rewritten and no
-      body returned by rewrite function, original request body is used
+    document. The rewrite rules are defined by the ``rewrites`` field of the
+    design document. The ``rewrites`` field can either be a *string* containing
+    the a rewrite function or an *array* of rule definitions.
+Using a stringified function for ``rewrites``
+    *The 'Rewrite using JS' feature was introduced in CouchDB 1.7*. When the
 Review comment:
   We have a standard 'version added' markup that might make sense for this 
note.  For example 
    I know you didn't change this, so consider this an optional suggestion.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to