ponylang / http_server

Pony library for building HTTP server applications.
https://ponylang.github.io/http_server/
BSD 2-Clause "Simplified" License
30 stars 8 forks source link

Use correct variable when setting content length #72

Closed SeanTAllen closed 10 months ago

SeanTAllen commented 10 months ago

None is stringable so the previous code here would work, but, in theory could eventually lead to "badness". The intent of the code was to match on a USize | None and set the content length to the string version of the USize if a USize.

However, it was setting to the string version of USize | None. Given the match statement, this was fine for now, but, the intent was clouded.

This could lead to a bug in the future if someone changed the code.