HTTP proxy implementation in C