Ohh that worked perfect! Thanks
Kedar
Michael Becke wrote:
Hello Kedar,
The method constructors expect the URI to be URL encoded. So for example if you are using:
GetMethod get = new GetMethod(someURI);
Then 'someURI' is expected to be URL encoded. You can encode URIs using the HttpClient URI class:
URI uri = new URI(someURI); GetMethod get = new GetMethod(uri.getEscapedURI());
Mike
On Jul 22, 2004, at 11:28 PM, Kedar Panse wrote:
I am in pickle here. I am trying to submit a post request to a URI which contains invalid uri characters IE/Netscape/firefox handles this fine.
I get exception:
Invalid uri '/loginserves/MYapp-{16FDC94F-736C-1DD1-8347-080020D8FE35}'
Now even if I replace { } with %7B and %7D and try to submit it, HTTPclient
sends request but encodes it again , meaning % is converted to %25
so /loginserves/MYapp-%7B16FDC94F-736C-1DD1-8347-080020D8FE35%7D becomes %257B16FDC94F-736C-1DD1-8347-080020D8FE35%257D
before it posts the data
and messes up the server.
I wonder if methodbase should have constructor with URI as argument where I can specify if its escaped already??
In the mean while any suggestions?
Thanks,
Kedar
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
