I have a servlet acting as a proxy to proxy the client requests to a remote server.

The proxy analyzes the httpservletrequest and sets up a httpurlconnection to the remote server, connects and then sets up the httpservletresponse to the client from the httpurlconnection.

This is working well for gets put I am having problems trying to figure out whats needed to handle file uploads in a multipart/form PORT request.

I *think* all I should have to do is set the httpurlconnection content-type to multipart/form-data and then get the requst input stream and write it byte-for-byte out on the httpurlconnection output stream ?

but the server is not responding as tho it worked so I presume I am not setting up correctly here ...

any suggestions or pointers as to what to look for that may still be needed ?