Cached redirects are processed differently than redirects from the network

NEW
Unassigned

Status

()

defect
P3
normal
7 years ago
2 years ago

People

(Reporter: briansmith, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-backlog])

For example, a redirect from the network that is missing a Location header will end up being treated like an error as far as AppCache fallback is concerned, and otherwise like a 200 response (in particular, we return the redirect's entity). 

But, we will never return the entity of a such a redirect from the cache because we skip over reading the entity for any cached 3xx response. (I am not sure the AppCache fallback is the same as the from-the-network case either.)

Basically, there seem to be many non-obvious differences due to this logic in ProcessResponse:

        PushRedirectAsyncFunc(&nsHttpChannel::ContinueProcessResponse);
        rv = AsyncProcessRedirection(httpStatus);
        if (NS_FAILED(rv)) {
            PopRedirectAsyncFunc(&nsHttpChannel::ContinueProcessResponse);
            LOG(("AsyncProcessRedirection failed [rv=%x]\n", rv));
            rv = ContinueProcessResponse(rv);
        }

vs the from-the-cache case in HandleAsyncRedirect:

        PushRedirectAsyncFunc(&nsHttpChannel::ContinueHandleAsyncRedirect);
        rv = AsyncProcessRedirection(mResponseHead->Status());
        if (NS_FAILED(rv)) {
            PopRedirectAsyncFunc(&nsHttpChannel::ContinueHandleAsyncRedirect);
            ContinueHandleAsyncRedirect(rv);
        }

The logic in ContinueProcessResponse is not the same (or even very similar) to ContinueHandleAsyncRedirect.

See also bug 747215 and bug 738484, which are related.
Whiteboard: [necko-backlog]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3
You need to log in before you can comment on or make changes to this bug.