Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: HTTP Interface
    • Labels:
    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      I just noticed this.

      $ curl -i http://localhost:5984//
      HTTP/1.1 500 Internal Server Error
      Server: CouchDB/1.2.0 (Erlang OTP/R15B)
      Date: Tue, 13 Mar 2012 08:48:46 GMT
      Content-Type: text/plain; charset=utf-8
      Content-Length: 53
      Cache-Control: must-revalidate

      {"error":"unknown_error","reason":"function_clause"}

      That's weird. Usually CouchDB strips trailing slashes:

      $ curl http://localhost:5984/x/////

      {"db_name":"x","doc_count":1,...}

      $ curl http://localhost:5984/x/blah/////
      {"_id":"blah","_rev":"2-6c4b3bc6c2fdc5043139942dc6f1b994","_attachments":{"out.txt" ...

      $ curl http://localhost:5984/x/blah////out.txt///////
      Hello, world!

        Activity

        Hide
        Timothy Chen added a comment -

        Are you currently working on this issue? This looks like an excellent 1st issue to tackle for a couchdb new comer like me.

        Show
        Timothy Chen added a comment - Are you currently working on this issue? This looks like an excellent 1st issue to tackle for a couchdb new comer like me.
        Hide
        Dave Cottlehuber added a comment -

        @TimothyChen feel free to take a crack!

        Show
        Dave Cottlehuber added a comment - @TimothyChen feel free to take a crack!
        Hide
        Julian Duque added a comment -

        This is my proposed solution in a PR: https://github.com/apache/couchdb/pull/122

        Show
        Julian Duque added a comment - This is my proposed solution in a PR: https://github.com/apache/couchdb/pull/122
        Hide
        ASF GitHub Bot added a comment -

        Github user orendon commented on the pull request:

        https://github.com/apache/couchdb/pull/122#issuecomment-39125848

        @julianduque This change seems to be harmless, though Travis build failed

        Show
        ASF GitHub Bot added a comment - Github user orendon commented on the pull request: https://github.com/apache/couchdb/pull/122#issuecomment-39125848 @julianduque This change seems to be harmless, though Travis build failed
        Hide
        ASF GitHub Bot added a comment -

        Github user kxepal commented on the pull request:

        https://github.com/apache/couchdb/pull/122#issuecomment-39128854

        @orendon Travis failed due to the reason unrelated to submitted PR (due to long paths for gnu tar).

        Show
        ASF GitHub Bot added a comment - Github user kxepal commented on the pull request: https://github.com/apache/couchdb/pull/122#issuecomment-39128854 @orendon Travis failed due to the reason unrelated to submitted PR (due to long paths for gnu tar).
        Hide
        ASF GitHub Bot added a comment -

        Github user kxepal commented on the pull request:

        https://github.com/apache/couchdb/pull/122#issuecomment-39129014

        @julianduque if it solves the issue - good then, but better to add some tests to ensure that this wouldn't be broken somewhere in future (;

        Show
        ASF GitHub Bot added a comment - Github user kxepal commented on the pull request: https://github.com/apache/couchdb/pull/122#issuecomment-39129014 @julianduque if it solves the issue - good then, but better to add some tests to ensure that this wouldn't be broken somewhere in future (;
        Hide
        ASF GitHub Bot added a comment -

        Github user julianduque commented on the pull request:

        https://github.com/apache/couchdb/pull/122#issuecomment-39134027

        @kxepal I'll take a look and add some tests

        Show
        ASF GitHub Bot added a comment - Github user julianduque commented on the pull request: https://github.com/apache/couchdb/pull/122#issuecomment-39134027 @kxepal I'll take a look and add some tests
        Hide
        ASF GitHub Bot added a comment -

        Github user robertkowalski commented on the pull request:

        https://github.com/apache/couchdb/pull/122#issuecomment-54551930

        Seems to be fixed on an upcoming Couch 2.0:

        ```
        (23:56:55) [robert@tequila-osx] ~/apache/couchdb (master) $ ./dev/run
        ```

        ```
        (23:59:14) [robert@tequila-osx] ~ $ curl -i http://localhost:15984/
        HTTP/1.1 200 OK
        X-CouchDB-Body-Time: 0
        X-Couch-Request-ID: e4310f0f
        Server: CouchDB/1705267 (Erlang OTP/17)
        Date: Thu, 04 Sep 2014 21:59:33 GMT
        Content-Type: text/plain; charset=utf-8
        Content-Length: 93
        Cache-Control: must-revalidate

        {"couchdb":"Welcome","version":"1705267","vendor":{"name":"The Apache Software Foundation"}}
        (23:59:33) [robert@tequila-osx] ~ $ curl -i http://localhost:15984//
        HTTP/1.1 200 OK
        X-CouchDB-Body-Time: 0
        X-Couch-Request-ID: 6c9a3bf1
        Server: CouchDB/1705267 (Erlang OTP/17)
        Date: Thu, 04 Sep 2014 21:59:36 GMT
        Content-Type: text/plain; charset=utf-8
        Content-Length: 93
        Cache-Control: must-revalidate

        {"couchdb":"Welcome","version":"1705267","vendor":{"name":"The Apache Software Foundation"}}
        ```

        @rnewson @davisp what do you think?

        Show
        ASF GitHub Bot added a comment - Github user robertkowalski commented on the pull request: https://github.com/apache/couchdb/pull/122#issuecomment-54551930 Seems to be fixed on an upcoming Couch 2.0: ``` (23:56:55) [robert@tequila-osx] ~/apache/couchdb (master) $ ./dev/run ``` ``` (23:59:14) [robert@tequila-osx] ~ $ curl -i http://localhost:15984/ HTTP/1.1 200 OK X-CouchDB-Body-Time: 0 X-Couch-Request-ID: e4310f0f Server: CouchDB/1705267 (Erlang OTP/17) Date: Thu, 04 Sep 2014 21:59:33 GMT Content-Type: text/plain; charset=utf-8 Content-Length: 93 Cache-Control: must-revalidate {"couchdb":"Welcome","version":"1705267","vendor":{"name":"The Apache Software Foundation"}} (23:59:33) [robert@tequila-osx] ~ $ curl -i http://localhost:15984// HTTP/1.1 200 OK X-CouchDB-Body-Time: 0 X-Couch-Request-ID: 6c9a3bf1 Server: CouchDB/1705267 (Erlang OTP/17) Date: Thu, 04 Sep 2014 21:59:36 GMT Content-Type: text/plain; charset=utf-8 Content-Length: 93 Cache-Control: must-revalidate {"couchdb":"Welcome","version":"1705267","vendor":{"name":"The Apache Software Foundation"}} ``` @rnewson @davisp what do you think?
        Hide
        ASF GitHub Bot added a comment -

        Github user davisp commented on the pull request:

        https://github.com/apache/couchdb/pull/122#issuecomment-85254157

        Its fixed on the clustered interface though we'll may want to port this to the couch_httpd.erl in couchdb-couch.git

        Show
        ASF GitHub Bot added a comment - Github user davisp commented on the pull request: https://github.com/apache/couchdb/pull/122#issuecomment-85254157 Its fixed on the clustered interface though we'll may want to port this to the couch_httpd.erl in couchdb-couch.git

          People

          • Assignee:
            Jason Smith
            Reporter:
            Jason Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development