Hi,
I am trying to make a HTTP proxy using libmicrohttpd which plays a
caching/proxy role between clients and an origin web server.
As of date, I almostly finished GET processing. For handling POST
request, I am confused in using libmicrohttpd API.
I want my proxy server relays incoming POST requests to the origin
server without inspecting the message body.
For POST, what I want is
(1)Parse incoming POSTs ; headers(key/value pairs) + message body (raw
bytes stream)
(2)Create a request message for origin
(3)Add request’s headers and my own headers to the request
(4)Add the message body to the request
(5)Send the request to the orgin
(6)Receive the response from the origin
(7)Create a response for the client
(8)Add the origin’s response to the response for client.
(9)Send the response to the client
So far, I could not found a proper API from libmicrohttpd for stage (1)
Any help will be highly appreciated!
Thanks in advance.
-----------------
Tawan Won