couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnewson <...@git.apache.org>
Subject [GitHub] couchdb-couch pull request: Respond with HTTP 400 Bad Request on i...
Date Mon, 13 Oct 2014 16:35:30 GMT
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/8#discussion_r18779586
  
    --- Diff: src/couch_doc.erl ---
    @@ -140,7 +140,13 @@ parse_rev(Rev) when is_binary(Rev) ->
     parse_rev(Rev) when is_list(Rev) ->
         SplitRev = lists:splitwith(fun($-) -> false; (_) -> true end, Rev),
         case SplitRev of
    -        {Pos, [$- | RevId]} -> {list_to_integer(Pos), parse_revid(RevId)};
    +        {Pos, [$- | RevId]} ->
    --- End diff --
    
    couldn't you do when is_integer(Pos) rather than a try/catch ?


---
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