Duplicate Content-Type for error document #492

Closed
opened 2023-01-29 02:05:55 +00:00 by jpds · 2 comments
Contributor

Garage appears to send duplicate content types for the error document set in a bucket:

$ curl -H "Host: www.local.com" http://localhost:3902/ -v
*   Trying 127.0.0.1:3902...
* Connected to localhost (127.0.0.1) port 3902 (#0)
> GET / HTTP/1.1
> Host: www.local.com
> User-Agent: curl/7.85.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< content-type: text/html
< content-type: application/xml
< last-modified: Sat, 28 Jan 2023 22:44:02 GMT
< accept-ranges: bytes
< etag: "f67bd069654e36c585bce3fb35038165"
< content-length: 765
< x-garage-error: API error: Key not found
< date: Sat, 28 Jan 2023 23:03:13 GMT
<
<!DOCTYPE html>
<html>
    <head>
...

...which then causes the document not to be rendered correctly in a browser.

Garage appears to send duplicate content types for the error document set in a bucket: ``` $ curl -H "Host: www.local.com" http://localhost:3902/ -v * Trying 127.0.0.1:3902... * Connected to localhost (127.0.0.1) port 3902 (#0) > GET / HTTP/1.1 > Host: www.local.com > User-Agent: curl/7.85.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 404 Not Found < content-type: text/html < content-type: application/xml < last-modified: Sat, 28 Jan 2023 22:44:02 GMT < accept-ranges: bytes < etag: "f67bd069654e36c585bce3fb35038165" < content-length: 765 < x-garage-error: API error: Key not found < date: Sat, 28 Jan 2023 23:03:13 GMT < <!DOCTYPE html> <html> <head> ... ``` ...which then causes the document not to be rendered correctly in a browser.
Owner

Just noticed this as well. It's reproducible on the deuxfleurs website: https://deuxfleurs.fr/foobar

Just noticed this as well. It's reproducible on the deuxfleurs website: https://deuxfleurs.fr/foobar
Owner

Firefox fails to parse the error page as XML:

XML Parsing Error: mismatched tag. Expected: </meta>.
Location: https://deuxfleurs.fr/foobar
Line Number 1, Column 217:
DOCTYPE html><html lang="fr"><head>...
Firefox fails to parse the error page as XML: ``` XML Parsing Error: mismatched tag. Expected: </meta>. Location: https://deuxfleurs.fr/foobar Line Number 1, Column 217: DOCTYPE html><html lang="fr"><head>... ```
lx closed this issue 2023-01-30 10:56:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#492
No description provided.