Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: TestServeContent failing on linux-amd64-wsl #45534

Closed
mknyszek opened this issue Apr 13, 2021 · 4 comments
Closed

net/http: TestServeContent failing on linux-amd64-wsl #45534

mknyszek opened this issue Apr 13, 2021 · 4 comments

Comments

@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Apr 13, 2021

As of https://golang.org/cl/305230, TestServeContent has started failing on the linux-amd64-wsl builder:

--- FAIL: TestServeContent (0.01s)
    fs_test.go:1086: test "with_last_modified" using "GET": got content-type = "application/xhtml+xml", want "text/html; charset=utf-8"
    fs_test.go:1086: test "with_last_modified" using "HEAD": got content-type = "application/xhtml+xml", want "text/html; charset=utf-8"
FAIL

CC @Jacalz @ianlancetaylor

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 13, 2021

Change https://golang.org/cl/309574 mentions this issue: mime: in globs2 file only keep first time extension is seen

@Jacalz
Copy link
Contributor

@Jacalz Jacalz commented Apr 13, 2021

Strange. I can't replicate it on my own machine, but it's good to see that there is a fix for it.

@bcmills
Copy link
Member

@bcmills bcmills commented Apr 13, 2021

It's not just WSL; it seems to affect a number of the reverse builders:
2021-04-13T14:13:57-4b00eb7/linux-amd64-wsl
2021-04-13T14:13:57-4b00eb7/solaris-amd64-oraclerel
2021-04-13T14:07:17-444d282/linux-amd64-wsl
2021-04-13T14:07:17-444d282/solaris-amd64-oraclerel
2021-04-13T13:56:21-13a4e8c/linux-amd64-wsl
2021-04-13T13:51:17-d948b86/linux-amd64-wsl
2021-04-13T13:51:17-d948b86/solaris-amd64-oraclerel
2021-04-12T22:50:31-49e933f/linux-amd64-wsl
2021-04-12T22:50:31-49e933f/linux-riscv64-jsing
2021-04-12T22:50:31-49e933f/solaris-amd64-oraclerel
2021-04-12T22:19:11-841bc14/linux-amd64-wsl
2021-04-12T22:19:11-841bc14/linux-riscv64-jsing
2021-04-12T22:19:11-841bc14/solaris-amd64-oraclerel
2021-04-12T21:59:59-263e13d/linux-amd64-wsl
2021-04-12T21:59:59-263e13d/linux-riscv64-jsing
2021-04-12T21:59:59-263e13d/solaris-amd64-oraclerel
2021-04-12T21:59:20-3d5e3a1/linux-amd64-wsl
2021-04-12T21:59:20-3d5e3a1/linux-riscv64-jsing
2021-04-12T21:59:20-3d5e3a1/solaris-amd64-oraclerel
2021-04-12T21:58:25-c27991b/linux-amd64-wsl
2021-04-12T21:58:25-c27991b/linux-riscv64-jsing
2021-04-12T21:58:25-c27991b/solaris-amd64-oraclerel
2021-04-12T21:57:23-cccd3ba/linux-amd64-wsl
2021-04-12T21:57:23-cccd3ba/linux-riscv64-jsing
2021-04-12T21:57:23-cccd3ba/solaris-amd64-oraclerel
2021-04-12T21:29:02-aad13cb/linux-amd64-wsl
2021-04-12T21:29:02-aad13cb/linux-riscv64-jsing
2021-04-12T21:29:02-aad13cb/solaris-amd64-oraclerel
2021-04-12T21:26:59-5c9b6e8/linux-amd64-wsl
2021-04-12T21:26:59-5c9b6e8/solaris-amd64-oraclerel
2021-04-12T21:04:48-3e8ba91/linux-amd64-wsl
2021-04-12T21:04:48-3e8ba91/solaris-amd64-oraclerel

@siebenmann
Copy link

@siebenmann siebenmann commented Apr 13, 2021

This also affects Fedora 33 and Ubuntu 20.04, although likely not Ubuntu 18.04. The critical element is what your /usr/share/mime/globs2 (or /usr/local/share/mime/globs2) contains for .html. On a system with the problem, it will have

; fgrep .html globs2
80:text/html:*.html
50:application/xhtml+xml:*.html

It appears whether this happens depends on what version of the /usr/share/mime/packages/freedesktop.org.xml file a system has. Older versions lumped .html and a few other extensions as HTML and text/html; later versions change this to XHTML and application/xhtml+xml, which adds the second globs2 entry for .html.

@gopherbot gopherbot closed this in 7b19fb1 Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants