diff --git a/CHANGELOG.md b/CHANGELOG.md index a62a1b2..eb85a14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgrade to wombat 3.8.6 (#334) - Fix wombat setup settings (especially `isSW`) (#293) +### Fixed + +- Stop checking main entry processability when it is already found (#424) + ## [2.1.3] - 2024-11-01 ### Changed diff --git a/src/warc2zim/converter.py b/src/warc2zim/converter.py index dc6ae46..ae36daf 100644 --- a/src/warc2zim/converter.py +++ b/src/warc2zim/converter.py @@ -478,7 +478,11 @@ def gather_information_from_warc(self): status_code = get_status_code(record) if not can_process_status_code(status_code): - if record.rec_type == "response" and self.main_path == zim_path: + if ( + not main_page_found + and record.rec_type == "response" + and self.main_path == zim_path + ): raise UnprocessableWarcError( f"Main URL returned an unprocessable HTTP code: {status_code}" ) diff --git a/test-website/Caddyfile b/test-website/Caddyfile index 7183c2b..150c6b2 100644 --- a/test-website/Caddyfile +++ b/test-website/Caddyfile @@ -73,6 +73,14 @@ respond /502-response 502 + respond // "Hello you" 400 + + respond /double-slash/test1 "Hello you" 200 + respond /double-slash//test1 400 + + respond /double-slash/test2 "Hello you v1" 200 + respond /double-slash//test2 "Hello you v2" 200 + redir /301-internal-redirect-ok /internal_redirect_target.html 301 redir /301-external-redirect-ok https://www.example.com 301 redir /302-internal-redirect-ok /internal_redirect_target.html 302 diff --git a/test-website/Dockerfile b/test-website/Dockerfile index 9bb5b9b..3296bbf 100644 --- a/test-website/Dockerfile +++ b/test-website/Dockerfile @@ -1,5 +1,5 @@ FROM caddy:2.6.1-alpine -LABEL org.opencontainers.image.source https://github.com/openzim/warc2zim +LABEL org.opencontainers.image.source=https://github.com/openzim/warc2zim COPY Caddyfile /etc/caddy/Caddyfile diff --git a/test-website/content/double-slash.html b/test-website/content/double-slash.html new file mode 100644 index 0000000..343877a --- /dev/null +++ b/test-website/content/double-slash.html @@ -0,0 +1,26 @@ + + + +
+ +