implement serveRemove and send WWW-Authenticate header on auth failure

This commit is contained in:
Joey Hess 2024-07-10 09:13:01 -04:00
parent 97d0fc9b65
commit 48f76cb3e8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 37 additions and 11 deletions

View file

@ -67,7 +67,12 @@ optParser _ = Options
)
seek :: Options -> CommandSeek
seek o = startConcurrency commandStages $
seek o = startConcurrency commandStages $ do
-- XXX remove this
when (isNothing (portOption o)) $ do
liftIO $ putStrLn "test begins"
testCheckPresent
giveup "TEST DONE"
withLocalP2PConnections $ \acquireconn -> liftIO $ do
authenv <- getAuthEnv
st <- mkP2PHttpServerState acquireconn $