On Jan 18, 2014, at 2:34 AM, Francisco Garcia 
<[email protected]<mailto:[email protected]>> wrote:

      db = CouchRest.database('http://localhost:4985/rubase/')
      db.save_doc({key:'joe'})

However with the Gateway the above call fails with:
       RestClient::MovedPermanently: 301 Moved Permanently
I believe it is only because the gateway redirects instead of accepting urls 
with/without final '/'

I would say this is a library bug — it should be following the redirect instead 
of treating it as an error (a 3xx status is not an error.)

But yeah, it would be better for compatibility if the gateway accepted requests 
to "/db" instead of redirecting them to "/db/". Unfortunately this is a 
behavior of the HTTP routing library we're using (GorillaMux) and when I looked 
into it a few months ago I couldn't find a clean way to change this behavior.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/C95BD4B6-9109-43AB-AE7F-23B0D1B833D2%40couchbase.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to