comment
This commit is contained in:
		
					parent
					
						
							
								c1b0348307
							
						
					
				
			
			
				commit
				
					
						c6c794a27d
					
				
			
		
					 2 changed files with 22 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
"""]]
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue