AsyncPluggableProtocol
AsyncPluggableProtocol copied to clipboard
IInternetProtocolSink.ReportResult() dwError arg
Hello.
Thank you for this awesome project of yours.
I believe that line 120 of Protocol.cs:
https://github.com/mganss/AsyncPluggableProtocol/blob/7bd88c29df5ae4530905bd95a5893faa4bddcfd5/Protocol.cs#L120
should not hardcode the 2nd argument (dwError) to zero. If hardcoding, 200 would be a more suitable value (it will get passed to the javascript xhr.status). But best would be if it's settable by the protocol implementation -- e.g. if somehow there's a way for ResourceProtocol.cs to specify this value.
Thanks for pointing this out. I think it would be best if IProtocol had a method GetResultAsync that returned a Task<IResult> where IResult looked something like this:
public interface IResult
{
Stream Response { get; set; }
int Status { get; set; }
string StatusText { get; set; }
}
Can you provide a PR?
I will try to provide a PR