1. url parse implementation with c