couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iilyak <...@git.apache.org>
Subject [GitHub] couchdb-chttpd pull request: Handle Etag generation in one place
Date Thu, 30 Apr 2015 12:34:27 GMT
Github user iilyak commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/34#discussion_r29424678
  
    --- Diff: src/chttpd.erl ---
    @@ -535,7 +535,15 @@ json_body_obj(Httpd) ->
     
     
     doc_etag(#doc{revs={Start, [DiskRev|_]}}) ->
    -    "\"" ++ ?b2l(couch_doc:rev_to_str({Start, DiskRev})) ++ "\"".
    +    rev_etag({Start, DiskRev}).
    +
    +rev_etag({Start, DiskRev}) ->
    +    Rev = couch_doc:rev_to_str({Start, DiskRev}),
    +    <<"\"", Rev/binary, "\"">>.
    +
    +make_etag() ->
    --- End diff --
    
    @rnewson: I don't think changing how `views`  handle etag generation is in the scope of
the bug. I could work on it in the context of another bug if you think it needs to be done
before 2.0 release. I would approach this by putting `#mrst.sig` into meta. Then when we get
[here](https://github.com/apache/couchdb-couch-mrview/blob/master/src/couch_mrview_http.erl#L331),
we can use `#mrst.sig` to calculate etag instead of relying on `#vacc.etag` (which is uuid
at this point).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message