Luukdegram / apple_pie

Basic HTTP server implementation in Zig
MIT License
163 stars 21 forks source link

Fix url decoding leaving undefined bytes in string #67

Closed leroycep closed 2 years ago

leroycep commented 2 years ago

This was caused by the using a single index for both the input buffer and the output buffer. Since percent encoding causes more space to be used, any percent encoding would make the index inaccurate for one of the strings -- in this case the output string.

I added tracking of the output index by creating an ArrayList and appending to it.

Luukdegram commented 2 years ago

Thank you!