You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Cameron Jacobson <ca...@datashovel.com> on 2013/08/26 10:26:58 UTC

404 response after updating document in futon

I encountered an issue while running 1.3.0.  Just to be safe, I upgraded
to 1.3.1, and am still encountering the issue.

I update a document in Futon, then immediately following that update, I
update that document via the _bulk_docs HTTP API call.

When I do this, the server response is "404 Object Not Found", but when
I refresh Futon, I see that the document has been updated.

This only seems to be happening on the _bulk_docs call immediately
following the Futon update.  Otherwise everything appears to be working
fine.

Thanks.

Re: 404 response after updating document in futon

Posted by Jens Alfke <je...@couchbase.com>.
On Aug 26, 2013, at 3:26 PM, Mark Hahn <ma...@reevuit.com>> wrote:

I don't know if this is related, but I see out-of-date results in futon all
the time.  I've gotten in the habit of hitting refresh twice instead of
once.  There must be some kind of cache.

It might be an issue with Etag or Last-Modified headers in the response  — some browsers send a conditional GET when you hit Refresh, and if the browser returns a 304 the page won’t be updated.

I just looked at a Futon response for a web page displaying a single document, and it looks like

HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Length: 3939
Content-Type: text/html
Date: Tue, 27 Aug 2013 19:52:43 GMT
Server: CouchDB/1.3.1 (Erlang OTP/R15B03)
last-modified: Fri, 28 Jun 2013 16:52:15 GMT

It’s been a while since I last dug into HTTP cachability, so I don’t remember exactly what “private, must-revalidate” means; but I _think_ it allows the client to send a conditional GET. So if Futon isn’t accurately generating the last-modified header (I have no idea where “28 Jun 2013” came from in that response!) it could cause problems with browser refresh.

—Jens

Re: 404 response after updating document in futon

Posted by Mark Hahn <ma...@reevuit.com>.
I don't know if this is related, but I see out-of-date results in futon all
the time.  I've gotten in the habit of hitting refresh twice instead of
once.  There must be some kind of cache.

On Mon, Aug 26, 2013 at 3:06 PM, Jens Alfke <je...@couchbase.com> wrote:

>
> On Aug 26, 2013, at 1:26 AM, Cameron Jacobson <ca...@datashovel.com>
> wrote:
>
> > I update a document in Futon, then immediately following that update, I
> > update that document via the _bulk_docs HTTP API call.
> >
> > When I do this, the server response is "404 Object Not Found", but when
> > I refresh Futon, I see that the document has been updated.
>
> Can we see details of the HTTP _bulk_docs request and response?
>
> —Jens

Re: 404 response after updating document in futon

Posted by Jens Alfke <je...@couchbase.com>.
On Aug 26, 2013, at 1:26 AM, Cameron Jacobson <ca...@datashovel.com> wrote:

> I update a document in Futon, then immediately following that update, I
> update that document via the _bulk_docs HTTP API call.
> 
> When I do this, the server response is "404 Object Not Found", but when
> I refresh Futon, I see that the document has been updated.

Can we see details of the HTTP _bulk_docs request and response?

—Jens