@@ -167,6 +167,8 @@ responseHeaderToBuilder b (x, y) = b
167 `mappend` copyByteString y
167 `mappend` copyByteString y
168 `mappend` newlineBuilder
168 `mappend` newlineBuilder
170+----------------------------------------------------------------
170-- | Use 'connSendAll' to send this data while respecting timeout rules.
172-- | Use 'connSendAll' to send this data while respecting timeout rules.
171connSink :: Connection -> T.Handle -> Sink B.ByteString (ResourceT IO) ()
173connSink :: Connection -> T.Handle -> Sink B.ByteString (ResourceT IO) ()
172connSink Connection { connSendAll = send } th =
174connSink Connection { connSendAll = send } th =
@@ -184,11 +186,14 @@ connSink Connection { connSendAll = send } th =
184 -- also make sure to resume the timeout after the completion of user code
186 -- also make sure to resume the timeout after the completion of user code
185 -- so that we can kill idle connections.
187 -- so that we can kill idle connections.
189+----------------------------------------------------------------
187serverHeader :: H.RequestHeaders -> H.RequestHeaders
191serverHeader :: H.RequestHeaders -> H.RequestHeaders
188−serverHeader hdrs = case lookup key hdrs of
192+serverHeader hdrs = case lookup hServer hdrs of
189− Nothing -> server : hdrs
193+ Nothing -> warpVersionHeader : hdrs
190− Just _ -> hdrs
194+ Just _ -> hdrs
196+warpVersionHeader :: H.Header
197+warpVersionHeader = (hServer, ver)
193 ver = B.pack $ "Warp/" ++ warpVersion
199 ver = B.pack $ "Warp/" ++ warpVersion