packages feed

warp 3.2.22 → 3.2.23

raw patch · 3 files changed

+11/−6 lines, 3 files

Files

ChangeLog.md view
@@ -1,3 +1,8 @@+## 3.2.23++* Log real requsts when an app throws an error.+  [#698](https://github.com/yesodweb/wai/pull/698)+ ## 3.2.22  * Fixing large request body in HTTP/2.
Network/Wai/Handler/Warp/Run.hs view
@@ -339,8 +339,9 @@             -- https://github.com/yesodweb/wai/issues/618             Just NoKeepAliveRequest -> return ()             Nothing -> do-              sendErrorResponse addr istatus e+              sendErrorResponse (dummyreq addr) istatus e               throwIO e+   where     getProxyProtocolAddr src =         case settingsProxyProtocol settings of@@ -388,12 +389,11 @@         | Just ConnectionClosedByPeer <- fromException se = False         | otherwise                                       = True -    sendErrorResponse addr istatus e = do+    sendErrorResponse req istatus e = do         status <- readIORef istatus         when (shouldSendErrorResponse e && status) $ do            let ii = toInternalInfo ii1 0 -- dummy-               dreq = dummyreq addr-           void $ sendResponse settings conn ii dreq defaultIndexRequestHeader (return S.empty) (errorResponse e)+           void $ sendResponse settings conn ii req defaultIndexRequestHeader (return S.empty) (errorResponse e)      dummyreq addr = defaultRequest { remoteHost = addr } @@ -405,7 +405,7 @@         keepAlive <- processRequest istatus src req mremainingRef idxhdr nextBodyFlush ii             `E.catch` \e -> do                 -- Call the user-supplied exception handlers, passing the request.-                sendErrorResponse addr istatus e+                sendErrorResponse req istatus e                 settingsOnException settings (Just req) e                 -- Don't throw the error again to prevent calling settingsOnException twice.                 return False
warp.cabal view
@@ -1,5 +1,5 @@ Name:                warp-Version:             3.2.22+Version:             3.2.23 Synopsis:            A fast, light-weight web server for WAI applications. License:             MIT License-file:        LICENSE