Skip to content

fix(storefront): strf-10118 Fix redirects stalling locally#1000

Merged
jordanarldt merged 1 commit intobigcommerce:masterfrom
jordanarldt:STRF-10118
Oct 10, 2022
Merged

fix(storefront): strf-10118 Fix redirects stalling locally#1000
jordanarldt merged 1 commit intobigcommerce:masterfrom
jordanarldt:STRF-10118

Conversation

@jordanarldt
Copy link
Contributor

What?

Fix redirects not working locally. Currently, any redirects happening within Stencil CLI will hang, and the redirect will never finish. This can be seen by creating a redirect and attempting to browse to the redirect in Stencil CLI, or by simply attempting to browse to a product without the trailing slash.

Why?

We should expect redirects to demonstrate the same behavior that one would see in the production environment of BigCommerce.

This issue was occurring because our RedirectsResponse.respond method was not stripping the 'content-length' header, causing the redirected response to be treated as a stream that would never resolve.

Tickets / Documentation

Video proof of fix

Before:

Screen.Recording.2022-10-10.at.4.08.18.PM.mov

After:

Screen.Recording.2022-10-10.at.4.10.14.PM.mov

cc @bigcommerce/storefront-team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants