pi_http: fix HTTP escaping
(cherry picked from commit 980dfc853c411730e07db74242188bc6190aafdf)