Skip to content

Change all relevant BasePDFStream implementations to take an actual URL instance#20614

Merged
Snuffleupagus merged 2 commits intomozilla:masterfrom
Snuffleupagus:BasePDFStream-url
Feb 1, 2026
Merged

Change all relevant BasePDFStream implementations to take an actual URL instance#20614
Snuffleupagus merged 2 commits intomozilla:masterfrom
Snuffleupagus:BasePDFStream-url

Conversation

@Snuffleupagus
Copy link
Collaborator

Currently this code expects a "url string", rather than a proper URL instance, which seems completely unnecessary now. The explanation for this is, as so often is the case, "historical reasons" since a lot of this code predates the general availability of URL.

… `URL` instance

Currently this code expects a "url string", rather than a proper `URL` instance, which seems completely unnecessary now. The explanation for this is, as so often is the case, "historical reasons" since a lot of this code predates the general availability of `URL`.
Note how `getDocument` checks the protocol, via the `isValidFetchUrl` helper, before attempting to use the `PDFFetchStream` implementation.
Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

r=me, with passing tests. Nice improvement!

@Snuffleupagus Snuffleupagus removed the request for review from calixteman February 1, 2026 21:00
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/f948f63fd84da81/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/16df841688e266e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/f948f63fd84da81/output.txt

Total script time: 2.72 mins

  • Unit Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/16df841688e266e/output.txt

Total script time: 9.27 mins

  • Unit Tests: FAILED

@Snuffleupagus Snuffleupagus merged commit d152e92 into mozilla:master Feb 1, 2026
11 checks passed
@Snuffleupagus Snuffleupagus deleted the BasePDFStream-url branch February 1, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants