diff --git a/source/vibe/http/common.d b/source/vibe/http/common.d index 3baf9b3820..6dc5b78cf7 100644 --- a/source/vibe/http/common.d +++ b/source/vibe/http/common.d @@ -365,8 +365,8 @@ final class ChunkedInputStream : InputStream { { // read chunk header logTrace("read next chunk header"); - auto ln = m_in.readLine(); - ulong sz = toImpl!ulong(cast(string)ln, 16u); + auto ln = cast(string)m_in.readLine(); + ulong sz = parse!ulong(ln, 16u); m_bytesInCurrentChunk = sz; if( m_bytesInCurrentChunk == 0 ){