comment
authorJoey Hess <joeyh@joeyh.name>
Tue, 15 Oct 2024 17:27:27 +0000 (13:27 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 15 Oct 2024 17:27:27 +0000 (13:27 -0400)
Remote/Directory.hs
doc/bugs/p2phttp__58___drop_difference_wideopen_unauth-readonly/comment_3_83dc4e317e09ad1e24fdd3ee347edb43._comment [new file with mode: 0644]

index cebd5e61fe979fe658615d11c7c4f3e02b556a0f..868dc4361149cd8e20e9775a631de75ccf16b6fc 100644 (file)
@@ -252,9 +252,9 @@ finalizeStoreGeneric d tmp dest = do
 
 retrieveKeyFileM :: RawFilePath -> ChunkConfig -> CopyCoWTried -> Retriever
 retrieveKeyFileM d (LegacyChunks _) _ = Legacy.retrieve locations' d
-retrieveKeyFileM d NoChunks cow = fileRetriever' $ \dest k p iv -> do
-       src <- liftIO $ fromRawFilePath <$> getLocation d k
-       void $ liftIO $ fileCopier cow src (fromRawFilePath dest) p iv
+--retrieveKeyFileM d NoChunks cow = fileRetriever' $ \dest k p iv -> do
+--     src <- liftIO $ fromRawFilePath <$> getLocation d k
+--     void $ liftIO $ fileCopier cow src (fromRawFilePath dest) p iv
 retrieveKeyFileM d _ _ = byteRetriever $ \k sink ->
        sink =<< liftIO (L.readFile . fromRawFilePath =<< getLocation d k)
 
diff --git a/doc/bugs/p2phttp__58___drop_difference_wideopen_unauth-readonly/comment_3_83dc4e317e09ad1e24fdd3ee347edb43._comment b/doc/bugs/p2phttp__58___drop_difference_wideopen_unauth-readonly/comment_3_83dc4e317e09ad1e24fdd3ee347edb43._comment
new file mode 100644 (file)
index 0000000..4bea40d
--- /dev/null
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2024-10-15T16:33:06Z"
+ content="""
+It's not a special case about locking. p2phttp always uses 403 when 
+the mode it's serving does not allow the class of action.
+
+Eg with --unauth-appendonly a remove request will cause a 403 response.
+And with --unauth-readonly any non-read request does.
+
+The docs say:
+
+"When authentication is successful but does not allow a request to be
+performed, it will fail with 403 Forbidden."
+
+A 401 does make git-annex prompt for a password. p2phttp responds to that
+when --authenv is used and the client didn't basic authenticate.
+"""]]