I am using the gSOAP generated classes to send and receive SOAP messages. The problem is that when I use the proxy like:
service.proxy_host = "some-proxy.mydomain.com";
service.proxy_port = 8080;
the POST header is being modified and is sending the entire endpoint URL and not just the application URL like this:
POST https://my-portal-server.mydomain.com/ecater/ws/rbiecat:data/some_Port HTTP/1.1
instead of just this:
POST /ecater/ws/rbiecat:data/some_Port HTTP/1.1
Can anyone tell me how I can modify the POST header before a request is sent? Or am I doing something wrong?
When
soap->proxy_host
is set then the full URL is used in the POST header, because the proxy requires an absolute path to connect to the destination endpoint. This is a compliance requirement.Alternatively, you can define a callback to override the HTTP post operation as follows: