jgm/gitit

When using --debug on Windows 10, cannot access [Gitit User’s Guide] due to stderr issue

kyanha opened this issue · 0 comments

Output from log:

================== Request =================
rqSecure      = False
rqMethod      = GET
rqPaths       = ["Gitit User\8217s Guide"]
rqUri         = /Gitit%20User%e2%80%99s%20Guide
rqQuery       =
rqInputsQuery = []
rqInputsBody  = <<mvar>>
rqCookies     = [("jsessionid",Cookie {cookieVersion = "", cookiePath = "", cookieDomain = "", cookieName = "jsessionid", cookieValue = "1vmuznkvh4q8imfzzkvomj78t", secure = False, httpOnly = False, sameSite =
SameSiteNoValue}),("sid",Cookie {cookieVersion = "", cookiePath = "", cookieDomain = "", cookieName = "sid", cookieValue = "189526007", secure = False, httpOnly = False, sameSite = SameSiteNoValue}),("security_
authentication",Cookie {cookieVersion = "", cookiePath = "", cookieDomain = "", cookieName = "security_authentication", cookieValue = "Fe26.2**e8a2e328422ff379df6b2c8f3e795f95c00419d45d02f6ba316d89420ea2d89a*1P
FpXEP01QrXg_YB0s75QA*0ZdXHZODAA23n2FpuA2n6n7KcLGzC68S0SFI-2mzbKDVEEyIfkjOr14kupIfsCagmk6CLRKOMeViS4pQbF1ZoXEtKDshKSopq92rqV0_LGG4JbGjKzMEzNDxlZAOUfhaw4D5kTAtylD60_scieXrpuaAiJ7E3I_H_Khz44EeSx6Tylb9ORAf1EpjJ65A1
m74aIMxZQuqnlajXX8mPX7pnKRpB0sWt7B0nQNWplqMrOc**27d439664f90f64bd8d9e96dbab52be05ec96c0beca449c9d566638aa8fd9b11*BMNwuy6MZNgjQcCJeE-k58aEPWs1WjxCI82Eva2iCZI", secure = False, httpOnly = False, sameSite = SameSi
teNoValue})]
rqVersion     = 1.1
rqHeaders     = fromList [("accept",HeaderPair {hName = "accept", hValue = ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"]}),("accept-encoding",HeaderPair {hName = "acc
ept-encoding", hValue = ["gzip, deflate, br"]}),("accept-language",HeaderPair {hName = "accept-language", hValue = ["en-US,en;q=0.5"]}),("connection",HeaderPair {hName = "connection", hValue = ["keep-alive"]}),
("cookie",HeaderPair {hName = "cookie", hValue = ["JSESSIONID=1vmuznkvh4q8imfzzkvomj78t; sid=\"189526007\"; security_authentication=Fe26.2**e8a2e328422ff379df6b2c8f3e795f95c00419d45d02f6ba316d89420ea2d89a*1PFpX
EP01QrXg_YB0s75QA*0ZdXHZODAA23n2FpuA2n6n7KcLGzC68S0SFI-2mzbKDVEEyIfkjOr14kupIfsCagmk6CLRKOMeViS4pQbF1ZoXEtKDshKSopq92rqV0_LGG4JbGjKzMEzNDxlZAOUfhaw4D5kTAtylD60_scieXrpuaAiJ7E3I_H_Khz44EeSx6Tylb9ORAf1EpjJ65A1m74
aIMxZQuqnlajXX8mPX7pnKRpB0sWt7B0nQNWplqMrOc**27d439664f90f64bd8d9e96dbab52be05ec96c0beca449c9d566638aa8fd9b11*BMNwuy6MZNgjQcCJeE-k58aEPWs1WjxCI82Eva2iCZI"]}),("dnt",HeaderPair {hName = "dnt", hValue = ["1"]}),(
"host",HeaderPair {hName = "host", hValue = ["localhost:5001"]}),("referer",HeaderPair {hName = "referer", hValue = ["http://localhost:5001/_index"]}),("remote_user",HeaderPair {hName = "REMOTE_USER", hValue =
[""]}),("sec-fetch-dest",HeaderPair {hName = "sec-fetch-dest", hValue = ["document"]}),("sec-fetch-mode",HeaderPair {hName = "sec-fetch-mode", hValue = ["navigate"]}),("sec-fetch-site",HeaderPair {hName = "sec-
fetch-site", hValue = ["same-origin"]}),("sec-fetch-user",HeaderPair {hName = "sec-fetch-user", hValue = ["?1"]}),("sec-gpc",HeaderPair {hName = "sec-gpc", hValue = ["1"]}),("upgrade-insecure-requests",HeaderPa
ir {hName = "upgrade-insecure-requests", hValue = ["1"]}),("user-agent",HeaderPair {hName = "user-agent", hValue = ["Mozilla/5.0 (Windows NT 10.0; rv:107.0) Gecko/20100101 Firefox/107.0"]})]
rqBody        = <<mvar>>
rqPeer        = ("127.0.0.1",60932)
Page = 'Gitit User================== Request =================

Error that happstack shows:

Happstack 7.7.1.1

Something went wrong here
Internal server error
Everything has stopped

The error was "<stderr>: hPutChar: invalid argument (invalid character)"

I think it's having issues with the UTF-8 for the single close quote character. However, this error doesn't actually appear in the log, the log entry just gets truncated and the following request doesn't happen at the start of the line. It is also a difference in behavior between debug and non-debug, since the non-debug invocation can access the appropriate file.

I am not a Haskell programmer. I managed to get stack installed and built gitit, then only just got it working an hour ago (due to gitit demanding grep to be on the path, an undeclared-in-the-docs dependency that I fixed by installing msys2). I don't know what specifically the problem is here, particularly since Windows 10 supports Unicode in its console.

I found this problem while putting gitit through its paces. Is there a test suite?