davidmoreno / onion

C library to create simple HTTP servers and Web Applications.
http://www.coralbits.com/libonion/
Other
2.02k stars 250 forks source link

Characters duplicate, newline char gets deleted when handling multi-line string from POST request #252

Open ghost opened 5 years ago

ghost commented 5 years ago

When string with empty lines between lines with text is sent as a param of request (e.g. data from webform), the second and every next line with text begins with duplicated characters. Furthermore, the empty lines get deleted.

Example: we send request through webform with method=post

test test

test test test

test test test test

the program calls onion_request_get_post, which returns

test test
tetest test test
tetest test test test

code.txt