-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Update send to v0.18.0 #78816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Update send to v0.18.0 #78816
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Hi @timneutkens, I am not sure you are the right person to review this PR, but based on the commit log, it looks like you were the last one to update this folder. Cheers! |
Failing test suitesCommit: b9114ce
Expand output● Test suite failed to run
Read more about building and testing Next.js in contributing.md.
Expand output● 404 Page Support with _app › development mode › should not show pages/404 GIP error if _app has GIP
Read more about building and testing Next.js in contributing.md.
Expand output● App assetPrefix config › should render correctly with assetPrefix: "/"
Read more about building and testing Next.js in contributing.md.
Expand output● page should not reload when the file is not changed
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - with output export - trailing slash dev › development mode › should work in dev with trailingSlash 'false'
● app dir - with output export - trailing slash dev › development mode › should work in dev with trailingSlash 'true'
Read more about building and testing Next.js in contributing.md.
Expand output● Default 404 Page with custom _error › development mode › should respond to 404 correctly
● Default 404 Page with custom _error › development mode › should render error correctly
● Default 404 Page with custom _error › development mode › should render index page normal
Read more about building and testing Next.js in contributing.md.
Expand output● Document and App › should not have any missing key warnings
Read more about building and testing Next.js in contributing.md.
Expand output● App asPath › should not have any changes in asPath after a bundle rebuild
Read more about building and testing Next.js in contributing.md.
Expand output● Missing _document components error › should detect missing Html component
● Missing _document components error › should detect missing Head component
● Missing _document components error › should detect missing Main component
● Missing _document components error › should detect missing NextScript component
● Missing _document components error › should detect multiple missing document components
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - with output export and custom distDir (next dev) › should render properly
Read more about building and testing Next.js in contributing.md.
Expand output● bigint API route support › development mode › should return 200
● bigint API route support › development mode › should return the BigInt result text
Read more about building and testing Next.js in contributing.md.
Expand output● Empty Project › Should not time out and return 404
Read more about building and testing Next.js in contributing.md.
Expand output● babel-next-image › should work with babel and next/image
Read more about building and testing Next.js in contributing.md.
Expand output● Babel › Rendering via HTTP › Should compile a page with flowtype correctly
Read more about building and testing Next.js in contributing.md.
Expand output● Catches Missing getStaticProps › development mode › should catch it in development mode
Read more about building and testing Next.js in contributing.md.
Expand output● Dynamic route rename casing › should not throw error when changing casing of dynamic route file
Read more about building and testing Next.js in contributing.md.
Expand output● Dynamic require › should not throw error when dynamic require is used
Read more about building and testing Next.js in contributing.md.
Expand output● Client Navigation accessibility › › should not have the initial route announced
● Client Navigation accessibility › › has aria-live="assertive" and role="alert"
● Client Navigation accessibility › › There is a title but no h1 tag › has the innerText equal to the value of document.title
● Client Navigation accessibility › › There is no title but a h1 tag › has the innerText equal to the value of h1
● Client Navigation accessibility › › There is a title and a h1 tag › has the innerText equal to the value of h1
● Client Navigation accessibility › › There is no title and no h1 tag › has the innerText equal to the value of the pathname
Read more about building and testing Next.js in contributing.md.
Expand output● Compression › should compress responses by default
Read more about building and testing Next.js in contributing.md.
Expand output● API routes › dev support › should return data when catch-all
● API routes › dev support › should return redirect when catch-all with index and trailing slash
● API routes › dev support › should return data when catch-all with index and trailing slash
● API routes › dev support › should return data when catch-all with index and no trailing slash
● API routes › production mode › should return data when catch-all
● API routes › production mode › should return redirect when catch-all with index and trailing slash
● API routes › production mode › should return data when catch-all with index and trailing slash
● API routes › production mode › should return data when catch-all with index and no trailing slash
Read more about building and testing Next.js in contributing.md.
Expand output● Configuration › should disable X-Powered-By header support
● Configuration › renders server config on the server only
● Configuration › renders public config on the server only
● Configuration › correctly imports a package that defines
● Configuration › should have config available on the client
Read more about building and testing Next.js in contributing.md.
Expand output● Custom Document Fragment Styles › production mode › correctly adds styles from fragment styles key
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - basepath › should successfully hard navigate from pages -> app
● app dir - basepath › should support
● app dir - basepath › should support Link with basePath prefixed
● app dir - basepath › should prefix segment metadata og image with basePath and pathname
● app dir - basepath › should prefix manifest with basePath
● app dir - basepath › should prefix redirect() with basePath
● app dir - basepath › should render usePathname without the basePath
● app dir - basepath › should handle redirect in dynamic in suspense boundary routes with basePath
● app dir - basepath › should only make a single RSC call to the current page (/base/refresh)
● app dir - basepath › should only make a single RSC call to the current page (/base/refresh?foo=bar)
● app dir - basepath › should properly stream an internal server action redirect() with a relative URL
● app dir - basepath › should properly stream an internal server action redirect() with a absolute URL
● app dir - basepath › should redirect externally when encountering absolute URLs on the same host outside the basePath
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir - esm js extension › should be able to render nextjs api in app router
● app-dir - esm js extension › should be able to use nextjs api in pages router
● app-dir - esm js extension › should support next/og image
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir edge runtime root layout › should not emit metadata files into bad paths
● app-dir edge runtime root layout › should mark static contain metadata routes as edge functions
Read more about building and testing Next.js in contributing.md.
Expand output● dynamic-io-dev-warmup › logs with Prerender or Server environment depending based on whether the timing of when the log runs relative to this environment boundary
Read more about building and testing Next.js in contributing.md.
Expand output● dynamic-requests warnings › warnings on sync cookie access
● dynamic-requests warnings › warnings on sync draftMode access
● dynamic-requests warnings › warnings on sync headers access
● dynamic-requests warnings › warnings on sync params access
● dynamic-requests warnings › warnings on sync searchParams access
● dynamic-requests warnings › no warnings › should have no warnings on normal rsc page without accessing params
● dynamic-requests warnings › no warnings › should only have hydration warnings on hydration mismatch page without accessing params
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir action disallowed origins › should error if x-forwarded-host does not match the origin
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir - owner-stack-invalid-element-type › should catch invalid element from a browser only component
● app-dir - owner-stack-invalid-element-type › should catch invalid element from a rsc component
● app-dir - owner-stack-invalid-element-type › should catch invalid element from on ssr client component
Read more about building and testing Next.js in contributing.md.
Expand output● app-fetch-errors › should still successfully render when a fetch request that acquires a cache lock errors
Read more about building and testing Next.js in contributing.md.
Expand output● app-prefetch-false › should avoid double-fetching when optimistic navigation fails
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "get" in dev
● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "head" in dev
● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "options" in dev
● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "post" in dev
● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "put" in dev
● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "delete" in dev
● app-dir - app routes errors › bad lowercase exports › should print an error when using lowercase "patch" in dev
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir action handling › should handle actions correctly after navigation / redirection events
● app-dir action handling › should handle actions correctly after following a relative link
Read more about building and testing Next.js in contributing.md.
Expand output● app-catch-all-optional › should handle optional catchall
● app-catch-all-optional › should handle optional catchall with no params
Read more about building and testing Next.js in contributing.md.
Expand output● app-simple-routes › works with simple routes › renders a node route
● app-simple-routes › works with simple routes › renders a edge route
Read more about building and testing Next.js in contributing.md.
Expand output● next/dynamic › Dynamic import › default behavior › should render dynamic import components
● next/dynamic › Dynamic import › default behavior › should render dynamic import components using a function as first parameter
● next/dynamic › Dynamic import › default behavior › should render even there are no physical chunk exists
● next/dynamic › Dynamic import › default behavior › should SSR nested dynamic components and skip nonSSR ones
● next/dynamic › Dynamic import › default behavior › should hydrate nested chunks
● next/dynamic › Dynamic import › default behavior › should render the component Head content
● next/dynamic › Dynamic import › ssr:false option › should not render loading on the server side
● next/dynamic › Dynamic import › ssr:false option › should render the component on client side
● next/dynamic › Dynamic import › ssr:false option › should import and render the ESM module correctly on client side
● next/dynamic › Dynamic import › ssr:true option › Should render the component on the server side
● next/dynamic › Dynamic import › ssr:true option › should render the component on client side
● next/dynamic › Dynamic import › custom chunkfilename › should render the correct filename
● next/dynamic › Dynamic import › custom chunkfilename › should render the component on client side
● next/dynamic › Dynamic import › custom loading › should render custom loading on the server side when
● next/dynamic › Dynamic import › custom loading › should render the component on client side
● next/dynamic › Dynamic import › Multiple modules › should only include the rendered module script tag
● next/dynamic › Dynamic import › Multiple modules › should only load the rendered module in the browser
● next/dynamic › Dynamic import › Multiple modules › should only render one bundle if component is used multiple times
● Test suite failed to run
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir action useActionState › should support submitting form state with JS
● app-dir action useActionState › should support submitting form state without JS
● app-dir action useActionState › should support hydrating the app from progressively enhanced form request
● app-dir action useActionState › should send the action to the provided permalink with form state when JS disabled
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir - async-client-component › app router client component async module
● app-dir - async-client-component › app router server component async module
Read more about building and testing Next.js in contributing.md.
Expand output● dev-fetch-hmr › should retain module level fetch patching
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - Metadata API on the Edge runtime › OG image route › should not bundle
● app dir - Metadata API on the Edge runtime › should render OpenGraph image meta tag correctly
Read more about building and testing Next.js in contributing.md.
Expand output● rewrites has condition › development mode › should navigate to a simple rewrite without error
● rewrites has condition › development mode › should navigate to a has rewrite without error
● rewrites has condition › production mode › should navigate to a simple rewrite without error
● rewrites has condition › production mode › should navigate to a has rewrite without error
Read more about building and testing Next.js in contributing.md.
Expand output● Undefined default export › should error if page component does not have default export
● Undefined default export › should error if layout component does not have default export
● Undefined default export › should error if not-found component does not have default export when trigger not-found boundary
● Undefined default export › should error when page component export is not valid
● Undefined default export › should error when page component export is not valid on initial load
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir action allowed origins › should pass if localhost is set as a safe origin
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir action handling › should handle action correctly with middleware rewrite
● app-dir action handling › should handle basic actions correctly
● app-dir action handling › should report errors with bad inputs correctly
● app-dir action handling › should propagate errors from a
● app-dir action handling › should trigger an error boundary for action responses with an invalid content-type
● app-dir action handling › should support headers and cookies
● app-dir action handling › should support setting cookies when redirecting (with javascript)
● app-dir action handling › should support setting cookies when redirecting (no javascript)
● app-dir action handling › should push new route when redirecting
● app-dir action handling › should replace current route when redirecting with type set to replace
● app-dir action handling › should support headers in client imported actions
● app-dir action handling › should not log errors for non-action form POSTs
● app-dir action handling › should support setting cookies in route handlers with the correct overrides
● app-dir action handling › should support formData and redirect
● app-dir action handling › should support .bind
● app-dir action handling › should support chained .bind
● app-dir action handling › should support notFound (javascript disabled)
● app-dir action handling › should support notFound
● app-dir action handling › should support uploading files
● app-dir action handling › should support hoc auth wrappers
● app-dir action handling › should support importing actions in client components
● app-dir action handling › should support importing the same action module instance in both server and action layers
● app-dir action handling › should not block navigation events while a server action is in flight
● app-dir action handling › should not block router.back() while a server action is in flight
● app-dir action handling › should trigger a refresh for a server action that gets discarded due to a navigation
● app-dir action handling › should trigger a refresh for a server action that also dispatches a navigation event
● app-dir action handling › should support next/dynamic with ssr: false
● app-dir action handling › should support next/dynamic with ssr: false (edge)
● app-dir action handling › should only submit action once when resubmitting an action after navigation
● app-dir action handling › should handle actions executed in quick succession
● app-dir action handling › should reset the form state when the action redirects to a page that contains the same form
● app-dir action handling › should invalidate the client router cache if the redirect action triggers a revalidation
● app-dir action handling › should reset the form state when the action redirects to itself
● app-dir action handling › should 404 when POSTing an invalid server action
● app-dir action handling › should log a warning when a server action is not found but an id is provided
● app-dir action handling › should be possible to catch network errors
● app-dir action handling › should be possible to catch regular errors
● app-dir action handling › should keep action instances identical
● app-dir action handling › should forward action request to a worker that contains the action handler (node)
● app-dir action handling › should forward action request to a worker that contains the action handler (edge)
● app-dir action handling › should not error when a forwarded action triggers a redirect (node)
● app-dir action handling › should not error when a forwarded action triggers a redirect (edge)
● app-dir action handling › should not expose action content in sourcemaps
● app-dir action handling › Edge SSR › should handle basic actions correctly
● app-dir action handling › Edge SSR › should return error response for hoc auth wrappers in edge runtime
● app-dir action handling › Edge SSR › should handle calls to redirect() with a relative URL in a single pass
● app-dir action handling › Edge SSR › should handle calls to redirect() with a absolute URL in a single pass
● app-dir action handling › Edge SSR › should handle calls to redirect() with external URLs
● app-dir action handling › Edge SSR › should allow cookie and header async storages
● app-dir action handling › Edge SSR › should handle unicode search params
● app-dir action handling › fetch actions › should handle a fetch action initiated from a static page
● app-dir action handling › fetch actions › should handle calls to redirect() with a relative URL in a single pass
● app-dir action handling › fetch actions › should handle calls to redirect() with a absolute URL in a single pass
● app-dir action handling › fetch actions › should handle calls to redirect() with external URLs
● app-dir action handling › fetch actions › should handle redirects to routes that provide an invalid RSC response
● app-dir action handling › fetch actions › should handle unstable_expirePath
● app-dir action handling › fetch actions › should handle unstable_expireTag
● app-dir action handling › fetch actions › should handle unstable_expireTag + redirect
● app-dir action handling › fetch actions › should store revalidation data in the prefetch cache
● app-dir action handling › fetch actions › should revalidate when cookies.set is called
● app-dir action handling › fetch actions › should invalidate client cache on other routes when cookies.set is called
● app-dir action handling › fetch actions › should revalidate when cookies.set is called in a client action
● app-dir action handling › fetch actions › should invalidate client cache when tag is revalidated
● app-dir action handling › fetch actions › should invalidate client cache when path is revalidated
● app-dir action handling › should work with interception routes
● app-dir action handling › encryption › should send encrypted values from the closed over closure
● app-dir action handling › encryption › should be able to resolve other server actions and client components
● app-dir action handling › redirects › redirects properly when server action handler uses
● app-dir action handling › redirects › redirects properly when server action handler uses
● app-dir action handling › redirects › displays searchParams correctly when redirecting with SearchParams
● app-dir action handling › redirects › merges cookies correctly when redirecting
● app-dir action handling › redirects › should not forward next-action header to a redirected RSC request
● app-dir action handling › redirects › redirects properly when server action handler redirects with a 307 status code
● app-dir action handling › redirects › redirects properly when server action handler redirects with a 308 status code
● app-dir action handling › server actions render client components › server component imported action › should support importing client components from actions
● app-dir action handling › server actions render client components › client component imported action › should support importing client components from actions
● app-dir action handling › caching disabled by default › should use no-store as default for server action
● app-dir action handling › caching disabled by default › should not override force-cache in server action
● app-dir action handling › caching disabled by default › should not override revalidate in server action
● app-dir action handling › request body decoding › should correctly decode multi-byte characters in the request body (node)
● app-dir action handling › request body decoding › should correctly decode multi-byte characters in the request body (edge)
Read more about building and testing Next.js in contributing.md.
Expand output● referencing a client component in an app route › responds without error
Read more about building and testing Next.js in contributing.md.
Expand output● dynamic-interception-route-revalidate › should refresh the dynamic intercepted route when the interception route is revalidated
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir alias › should handle typescript paths alias correctly
● app-dir alias › should resolve css imports from outside with src folder presented
● app-dir alias › should not contain installed react/react-dom version in client chunks
● app-dir alias › should generate app-build-manifest correctly
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - crossOrigin config › skip in start mode
Read more about building and testing Next.js in contributing.md.
Expand output● app dir - css - experimental inline css › Production only › should render page with correct styles
● app dir - css - experimental inline css › Production only › should not return rsc payload with inlined style as a dynamic client nav
● app dir - css - experimental inline css › Production only › should have only one style tag when navigating from page with inlining to page without inlining
Read more about building and testing Next.js in contributing.md.
Expand output● router autoscrolling on navigation with css modules › vertical scroll when page imports css modules › should scroll to top of document when navigating between to pages without layout when
● router autoscrolling on navigation with css modules › vertical scroll when page imports css modules › should scroll when clicking in JS
Read more about building and testing Next.js in contributing.md.
Expand output● typed-env › should have env types from next config
Read more about building and testing Next.js in contributing.md.
Expand output● Rewritten API Requests should pass OPTIONS requests to the api function › should pass OPTIONS requests to the api function
● Test suite failed to run
Read more about building and testing Next.js in contributing.md.
Expand output● ReactRefreshLogBox app › server-side only compilation errors
● Test suite failed to run
● Test suite failed to run
Read more about building and testing Next.js in contributing.md.
Expand output● app-dir edge SSR › should handle edge only routes
● app-dir edge SSR › should retrieve cookies in a server component in the edge runtime
● app-dir edge SSR › should treat process as object without polyfill in edge runtime
● app-dir edge SSR › should handle /index routes correctly
● app-dir edge SSR › should warn about the re-export of a pages runtime/preferredRegion config
● app-dir edge SSR › should resolve module without error in edge runtime
● app-dir edge SSR › should resolve client component without error
● app-dir edge SSR › should handle edge rsc hmr
Read more about building and testing Next.js in contributing.md. |
Seems like this is breaking tests:
-- https://github.com/vercel/next.js/actions/runs/14817763757/job/41639462880?pr=78816#step:34:117 |
@eps1lon Thanks for looking into the issue. I just checked and it looks like the |
Why?
Currently, Next.js uses a precompiled version of send under
next/dist/compiled/send
, which is based on an outdated version. This older version omits headers like Content-Security-Policy (CSP) when returning a 304, even if those headers were present in the initial 200 response.As a result, CSP headers are either missing entirely or fallback to default CDN-level policies in cached responses. This behavior causes security issues or inconsistent enforcement in strict CSP environments.
What?
This PR upgrades the internal
send
package used in static asset serving to the latest official version (v1.2.0), which includes proper handling of headers in 304 Not Modified responses.Fixes #78815