Why OPTIONS method is not supported by Couchbase Lite server.

46 views
Skip to first unread message

Suraj Khurana

unread,
May 5, 2015, 10:59:10 AM5/5/15
to mobile-c...@googlegroups.com
While testing you app, some pre-flight call are done by most of the browsers which sends and OPTIONS method for confirmation and in response we got 405, Method Not Allowed.
I don't found any other reason for that, there might be something I am doing wrong but as far as my knowledge and research everything is correct at my end.
Please provide your necessary feedbacks on the same.

Jens Alfke

unread,
May 5, 2015, 11:41:16 AM5/5/15
to mobile-c...@googlegroups.com

> On May 5, 2015, at 2:24 AM, Suraj Khurana <suraj....@hotwaxsystems.com> wrote:
>
> While testing you app, some pre-flight call are done by most of the browsers which sends and OPTIONS method for confirmation and in response we got 405, Method Not Allowed.

I don't think we've implemented the OPTIONS method in CBL, but it hasn't come up as an issue before. Can you describe the specific situation where you find it's needed?

—Jens

atom992

unread,
Jul 3, 2015, 12:35:23 PM7/3/15
to mobile-c...@googlegroups.com
I have the same problem , when I used chrome to set a XHR request to SG REST API, I can find the request method is not POST but OPTIONS. I thought it is a CROS issue, but it is not.

Jens Alfke

unread,
Jul 3, 2015, 1:12:05 PM7/3/15
to mobile-c...@googlegroups.com

On Jul 3, 2015, at 9:35 AM, atom992 <yangzi...@gmail.com> wrote:

I have the same problem , when I used chrome to set a XHR request to SG REST API, I can find the request method is not POST but OPTIONS. I thought it is a CROS issue, but it is not.

It’s not the same thing; the earlier messages in this thread were talking about Couchbase Lite’s HTTP listener. Sync Gateway supports OPTIONS:

$  http OPTIONS :4984/
HTTP/1.1 204 No Content
Allow: GET, HEAD
Date: Fri, 03 Jul 2015 17:08:20 GMT

$  http OPTIONS :4984/attach-test
HTTP/1.1 204 No Content
Allow: GET, HEAD, POST, PUT
Date: Fri, 03 Jul 2015 17:08:35 GMT

If you’ve found a specific case where it doesn’t, then file a bug report with details on the version and the URL.

—Jens
Reply all
Reply to author
Forward
0 new messages