update possible archive http statuses

This commit is contained in:
Jon Schoning 2019-10-27 16:01:10 -05:00
parent ad4bb3fe8f
commit 4c272d0198

View file

@ -42,7 +42,7 @@ archiveBookmarkUrl kbid url =
case status of
s | s == NH.status200 ->
for_ (lookup "Refresh" headers >>= _parseRefreshHeaderUrl) updateArchiveUrl
s | s == NH.status302 ->
s | s == NH.status302 || s == NH.status307 ->
for_ (lookup "Location" headers) (updateArchiveUrl . decodeUtf8)
_ -> $(logError) (pack (show res)))
`catch` (\(e::SomeException) -> ($(logError) $ (pack.show) e) >> throwIO e)