Repository navigation
Conversation
Replace the synchronous XMLHttpRequest in checkResourceExists with an async fetch. Some browser extensions wrap XMLHttpRequest, and the wrapped synchronous requests report status 0. Both existence checks then fail and every crosslink falls back to the API index page instead of the model or client page. Move the redirect resolution into an async function and navigate once it resolves. Cancel the response body after reading the status so the check does not download large pages such as S3Client.html.
S-Saranya1
approved these changes
Dec 4, 2026
dagnir
enabled auto-merge
December 4, 2026 21:35
dagnir
added this pull request to the merge queue
Dec 4, 2026
Any commits made after this event will not be merged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fix incorrect redirects from AWS docs page to javadoc, for example https://docs.aws.amazon.com/goto/SdkForJavaV2/s3-2006-03-01/PutObject which should redirect to https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/services/s3/S3Client.html#putObject(software.amazon.awssdk.services.s3.model.PutObjectRequest).
The way we check whether a target javadoc page is via sync XHR. Unfortunately, this breaks in instances where browser plugins or similar wraps XHR and modify its behavior, specifically w.r.t. to the returned status code.
Modifications
This change updates the
crosslink_redirect.htmlpage to use thefetch()API instead of XHR.Testing
Tested locally with a test webserver.
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.AI tools
License