This allows
HttpRequestMessageProperty request = new HttpRequestMessageProperty ();
request.Headers.Add ("Foo", "Bar");
OperationContext.Current.OutgoingMessageProperties.Add (HttpRequestMessageProperty.Name, request);
The code was already there, but disabled for the NET_2_1 profile.
.NET throws a EndpointNotFoundException encapsulating a WebException when a
REST request returns a 404.
The attached patch tests for a 404 and throws the same exception chain thrown
by .NET.
OutgoingWebRequestContext throws a NullReferenceException when making a REST
call. The exception is thrown because there are no Headers in the context.
Attached patch simply tests for null before copying values from Headers.
System.ServiceModel.Channels.HttpRequestChannel never added the configured
certificate to the HttpWebRequest which prevented client side authentication.
The attached patch does exactly that if a certificate has been configured.
* System.ServiceModel.Channels/HttpRequestChannel.cs: For Moonlight use
the WebResponse.SupportsHeaders before accessing the Headers collection.
This is needed because (the default) browser stack does not expose the
headers from its responses. Fix bug #642193
empty message and return that.
Note: the ws-mc protocol defines that the service returns an
200 response with an empty body on first connection, this
adds support for that (fixes part of #599667)
svn path=/trunk/mcs/; revision=157525
* HttpRequestChannel.cs, HttpChannelFactory.cs,
HttpChannelListener.cs, HttpListenerManager.cs :
implemented http client authentication and some of corresponding
service code. Only client works so far.
svn path=/trunk/mcs/; revision=147642
* HttpRequestChannel.cs (WaitEnd): Neither Moonlight nor MonoTouch
support contexts so we call the non-overloaded WaitOne method
(which defaults to false).
svn path=/trunk/mcs/; revision=144200
* ContractDescriptionGenerator.cs : default action name is prepended
"urn:", and on the other hand do not add extra '/' in such case.
* HttpRequestChannel.cs : Fix message version member comparison.
Double-quote SOAPAction. Remove extra Exception.
* HttpReplyChannel.cs : ditto for version comparison. Unquote above.
* HttpRequestContext.cs : when addressing is None, remove action
from the message.
svn path=/trunk/mcs/; revision=141394
* HttpRequestChannel.cs, RequestChannelBase.cs :
A couple of async members are now implemented in the base class.
Ditto for EndpointAddress and Via.
svn path=/trunk/mcs/; revision=138122
2009-06-05 Sebastien Pouliot <[email protected]>
* ClientAccessPolicy.cs: Removed
* CrossDomainAccessManager.cs: Removed
* CrossDomainPolicy.cs: Removed
* HttpRequestChannel.cs: Remove call to CrossDomainAccessManager
since this is now done inside the BeginGetResponse call (outside
this assembly) for Moonlight (NET_2_1)
In .:
2009-06-05 Sebastien Pouliot <[email protected]>
* net_2_1_raw_System.ServiceModel.dll.sources: Remove
ClientAccessPolicy.cs, CrossDomainPolicy.cs and
CrossDomainAccessManager.cs since the code and checks is now done
inside System.Windows.Browser.dll, by BrowserHttpWebRequest, for
every non-site-or-origin web connection - i.e. http[s]
svn path=/trunk/mcs/; revision=135513
* HttpRequestChannel.cs : Rewrite ProcessRequest to use the async APIs
instead of the sync apis. Prevents a possible deadlock condition in
moonlight.
svn path=/trunk/mcs/; revision=135467