Skip to content

feat(w3c/headers): validate header links#4037

Closed
marcoscaceres wants to merge 3 commits intomainfrom
validate_latest
Closed

feat(w3c/headers): validate header links#4037
marcoscaceres wants to merge 3 commits intomainfrom
validate_latest

Conversation

@marcoscaceres
Copy link
Copy Markdown
Contributor

@marcoscaceres marcoscaceres commented Feb 16, 2022

Complains if latestVersion doesn't exist, while it also prevents CG drafts from claiming to have a latestVersion.

Copy link
Copy Markdown
Member

@sidvishnoi sidvishnoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check in detail from computer.

Comment thread src/w3c/headers.js
@sidvishnoi sidvishnoi self-requested a review February 16, 2022 07:23
Comment on lines +37 to +40
${conf.latestVersion !== null
? html`<dt>${l10n.latest_published_version}</dt>
<dd>
${conf.latestVersion
${conf.latestVersion !== ""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is it null, and when is it "" in particular?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it's null, it shouldn't be included... but when it's ""... I need to check :(

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 6, 2025

Deploy Preview for respec-pr ready!

Name Link
🔨 Latest commit 8e701bd
🔍 Latest deploy log https://app.netlify.com/projects/respec-pr/deploys/68f0500191d6c90008bbd5ef
😎 Deploy Preview https://deploy-preview-4037--respec-pr.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

marcoscaceres added a commit that referenced this pull request Mar 27, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Mar 28, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Mar 28, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Mar 28, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Mar 28, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Mar 28, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Apr 13, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
marcoscaceres added a commit that referenced this pull request Apr 20, 2026
- Warn if latestVersion URL doesn't resolve (non-FPWD docs)
- CG drafts (specStatus ending in -DRAFT) no longer require latestVersion
- Extract resourceExists() helper that returns the final URL after
  redirects (or null), replacing ad-hoc fetch+ok patterns
- deriveHistoryURI() now returns a value instead of mutating conf,
  and uses resourceExists() to avoid duplicating fetch logic
- Guard conf.historyURI = null (user suppression) at the call site
  so explicit null is not overwritten by derivation
- Fix URL construction: use response.url (post-redirect) for the
  history URL rather than the pre-redirect constructed URL

Fixes #4037 (rebased from validate_latest branch)
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