File tree 1 file changed +8
-2
lines changed
src/Distribution/Server/Framework 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -464,8 +464,14 @@ serveResource errRes (Resource _ rget rput rpost rdelete rformat rend _) = \dpat
464
464
Just answer -> handleErrors (Just format) $ answer dpath
465
465
Nothing -> mzero -- return 404 if the specific format is not found
466
466
-- return default response when format is empty or non-existent
467
- _ -> do (format,answer) <- negotiateContent (head res) res
468
- handleErrors (Just format) $ answer dpath
467
+ _ -> do
468
+ let
469
+ contentResponsePair =
470
+ case find ((== " html" ) . fst ) res of
471
+ Just x -> x
472
+ Nothing -> head res
473
+ (format,answer) <- negotiateContent contentResponsePair res
474
+ handleErrors (Just format) $ answer dpath
469
475
470
476
handleErrors format =
471
477
handleErrorResponse (serveErrorResponse errRes format)
You can’t perform that action at this time.
0 commit comments