CouchDB
  1. CouchDB
  2. COUCHDB-1097

Unable to do an OPTIONS request to shows or lists

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.2, 1.2.1, 1.3
    • Component/s: HTTP Interface
    • Labels:

      Description

      When using XHR to access CouchDB, it is not possible to respond to OPTIONS requests for shows or lists. This means that it's impossible for to tell the requesting browsers which communication options are available causing it to throw a Access-Control-Allow error.

      I've patched this in my github fork of CouchDB at:
      https://github.com/omarkj/couchdb/commit/a11ba543581c05d61b031d044bad9f9d63c875c0

        Activity

        Hide
        Jan Lehnardt added a comment -

        Fixed, thanks!

        Show
        Jan Lehnardt added a comment - Fixed, thanks!
        Hide
        Omar Yasin added a comment -

        A single patch with the changes is attached.

        Show
        Omar Yasin added a comment - A single patch with the changes is attached.
        Hide
        Jan Lehnardt added a comment -

        Omar, that is exactly what I meant

        Finally, can you provide a single patch against trunk, I'd rather not stitch together multiple patches or trees, thanks

        Show
        Jan Lehnardt added a comment - Omar, that is exactly what I meant Finally, can you provide a single patch against trunk, I'd rather not stitch together multiple patches or trees, thanks
        Hide
        Omar Yasin added a comment -

        Just added a test to list_views.js. Is that what you were talking about? I'm not well aquatinted with the CouchDB testing suite.

        Patch at
        https://github.com/omarkj/couchdb/commit/1f4cbc98b4adaf586ea2dade79a9bef6a47e85ef#share/www/script/test/list_views.js

        I've also attached the patch to this ticket.

        Show
        Omar Yasin added a comment - Just added a test to list_views.js. Is that what you were talking about? I'm not well aquatinted with the CouchDB testing suite. Patch at https://github.com/omarkj/couchdb/commit/1f4cbc98b4adaf586ea2dade79a9bef6a47e85ef#share/www/script/test/list_views.js I've also attached the patch to this ticket.
        Hide
        Jan Lehnardt added a comment -

        Looking good, can you add tests to that?

        Show
        Jan Lehnardt added a comment - Looking good, can you add tests to that?
        Hide
        Omar Yasin added a comment -

        I've udpated the patch to no longer use copied code, but rather changed the match:

        Patched version available at
        https://github.com/omarkj/couchdb/commit/51fcd4c60fdb501298e82b2ff1c2299ed5dd2041

        Show
        Omar Yasin added a comment - I've udpated the patch to no longer use copied code, but rather changed the match: Patched version available at https://github.com/omarkj/couchdb/commit/51fcd4c60fdb501298e82b2ff1c2299ed5dd2041

          People

          • Assignee:
            Unassigned
            Reporter:
            Omar Yasin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development