WebService target HttpPost and HttpGet not working

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WebService target HttpPost and HttpGet not working

thebrownmonster
I cannot get either of these to work correctly.  With httpget, I never get routed to the service.  With httppost I do get routed to the service but the first parameter is incorrectly encoded in the http request. All subsequent parameters are fine, but the first one starts with %ufeff.  My workaround is to just create a dummy parameter for the first one and then all the rest are fine.

?Request.Params
{%ufefflog=testLog&level=testLevel ...

Also, writing to the internalLogFile has not been helpful.  It doesn not reveal anything unless I'm missing something.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebService target HttpPost and HttpGet not working

thebrownmonster
well after looking into the code, it appears that HttpGet is not implemented yet, so that answers 1 problem.

as far as HttpPost is concerned, the issue appears to be in WebServiceTarget.cs in method PreparePostRequest.  if I change to the following it works fine:

//var sw = new StreamWriter(ms, this.Encoding);
var sw = new StreamWriter(ms);


Stepping through the code I see that this.Encoding is UTF8 as it should be, but it modifies the stream with a BOM.  I removed it as the stream is already doing url encoding and the content charset is also set to utf-8.

Issue??
Loading...