scotty-web / scotty

Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository)
http://hackage.haskell.org/package/scotty
BSD 3-Clause "New" or "Revised" License
1.72k stars 134 forks source link

Allow building with `text-2.0` #287

Closed RyanGlScott closed 2 years ago

RyanGlScott commented 2 years ago

For the most part, this is simply a matter of raising the upper version bounds in the .cabal file. The max-size request test case in the test suite needed to be adjusted, as it needs to pick a sufficiently large request such that it takes multiple chunks to store it as a lazy Text value. With text-2.0 or later, the amount of ASCII characters that a single chunk can store is much larger due to using UTF-8 encoding internally, so we must generate a larger request to compensate.