CARVIEW |
Select Language
HTTP/2 200
date: Mon, 14 Jul 2025 18:44:25 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/w3c/epubcheck.git
etag: W/"b1dbf0b31db7364703573c593f520f88"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=P42tmg7VqXkIzbe7K7I5qIafcuZDWUOhciH37tV%2B759fJe5iq2hfD6787gqb7hdwmhiPv2bLQJrYwEMi2qeZGSzfi3LMCYCdZi9UuUvgzYuSeI4sJG31KL23MFzAS2%2F6Mjptzp5q2n9CjgKihG0iSWSEnJm19EfGEnvAGtp7niKtDTabSNDUEUmGXtl%2BsU5aw7fVFnj1O9KxnKTFJIj3lqUkTtoV1LGr02lYP%2Fy6ruNtnwJSopewKL3h6JX4AqmfWA7%2FiiVi%2FK4KXTzUYSNxTw%3D%3D--IanNM%2FEDRsbQmTl%2B--KIk9kFP4FhH3GBDK8FGvqw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.670315973.1752518665; Path=/; Domain=github.com; Expires=Tue, 14 Jul 2026 18:44:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 14 Jul 2026 18:44:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BEA6:2FCF1:15FD80C:1B1DB46:68755008
fix: normalize URLs before checking if the resources exist · w3c/epubcheck@0323668 · GitHub
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/ocf/OCFContainer.java
Copy file name to clipboardExpand all lines: src/main/java/org/w3c/epubcheck/core/references/URLChecker.java
Copy file name to clipboardExpand all lines: src/main/java/org/w3c/epubcheck/util/url/URLUtils.java
Copy file name to clipboard
Copy file name to clipboard
Copy file name to clipboard
Copy file name to clipboard
Copy file name to clipboard
Copy file name to clipboardExpand all lines: src/test/resources/epub3/04-ocf/ocf.feature
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 418
Commit 0323668
committed
fix: normalize URLs before checking if the resources exist
URLs were not normalized before performing existence checks. So percent-encoded URLs sometimes triggered `RSC-001` or `RSC-007` errors.
This commit introduces a new `normalize(URL)` method in the `URLUtils` class. Normalization is now used when checking a URL. This notably applies to resource and ID existence checks.
Important Note:
URL normalization is not well-defined. Some percent-encoding normalization is described in RFC3986, but is not defined in the URL standard. Also, normalization (as useful for EPUBCheck) is also dependent on the URL scheme.
The normalization we apply is quite naïve and might need to be improved in the future. It should however cover the majority of HTTP URL real-world scenarios.
Fix #14791 parent 0f0cece commit 0323668Copy full SHA for 0323668
File tree
Expand file treeCollapse file tree
9 files changed
+90
-7
lines changedFilter options
- src
- main/java
- com/adobe/epubcheck/ocf
- org/w3c/epubcheck
- core/references
- util/url
- test/resources/epub3/04-ocf
- files/url-percent-encoded-valid
- EPUB
- META-INF
Expand file treeCollapse file tree
9 files changed
+90
-7
lines changedsrc/main/java/com/adobe/epubcheck/ocf/OCFContainer.java
Copy file name to clipboardExpand all lines: src/main/java/com/adobe/epubcheck/ocf/OCFContainer.java+8-2Lines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
82 |
| - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 |
| |
84 | 91 |
| |
85 | 92 |
| |
| |||
134 | 141 |
| |
135 | 142 |
| |
136 | 143 |
| |
137 |
| - | |
138 | 144 |
|
src/main/java/org/w3c/epubcheck/core/references/URLChecker.java
Copy file name to clipboardExpand all lines: src/main/java/org/w3c/epubcheck/core/references/URLChecker.java+3-1Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
| 6 | + | |
5 | 7 |
| |
6 | 8 |
| |
7 | 9 |
| |
| |||
64 | 66 |
| |
65 | 67 |
| |
66 | 68 |
| |
67 |
| - | |
| 69 | + | |
68 | 70 |
| |
69 | 71 |
| |
70 | 72 |
| |
|
src/main/java/org/w3c/epubcheck/util/url/URLUtils.java
Copy file name to clipboardExpand all lines: src/main/java/org/w3c/epubcheck/util/url/URLUtils.java+25-4Lines changed: 25 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| |||
79 | 80 |
| |
80 | 81 |
| |
81 | 82 |
| |
82 |
| - | |
| 83 | + | |
83 | 84 |
| |
84 |
| - | |
| 85 | + | |
85 | 86 |
| |
86 | 87 |
| |
87 | 88 |
| |
| |||
151 | 152 |
| |
152 | 153 |
| |
153 | 154 |
| |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
154 | 175 |
| |
155 | 176 |
| |
156 | 177 |
| |
157 | 178 |
| |
158 |
| - | |
| 179 | + | |
159 | 180 |
| |
160 |
| - | |
| 181 | + | |
161 | 182 |
| |
162 | 183 |
| |
163 | 184 |
| |
|
src/test/resources/epub3/04-ocf/files/url-percent-encoded-valid/EPUB/content&001.xhtml
Copy file name to clipboard+11Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + |
src/test/resources/epub3/04-ocf/files/url-percent-encoded-valid/EPUB/nav.xhtml
Copy file name to clipboard+14Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + |
src/test/resources/epub3/04-ocf/files/url-percent-encoded-valid/EPUB/package.opf
Copy file name to clipboard+16Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + |
src/test/resources/epub3/04-ocf/files/url-percent-encoded-valid/META-INF/container.xml
Copy file name to clipboard+6Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + |
src/test/resources/epub3/04-ocf/files/url-percent-encoded-valid/mimetype
Copy file name to clipboard+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + |
src/test/resources/epub3/04-ocf/ocf.feature
Copy file name to clipboardExpand all lines: src/test/resources/epub3/04-ocf/ocf.feature+6Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
117 | 123 |
| |
118 | 124 |
| |
119 | 125 |
| |
|
You can’t perform that action at this time.
0 commit comments