Hello, I’m playing around with thrift and http on a custom server implementation, while I got some manual stuff already running against the default client, i.e. generated stuff by the thrift command:
Java (on Scala) Client:
def main(args: Array[String]): Unit = {
val binaryProtocol = new TBinaryProtocol(new THttpClient(„URL"))
val service = new ExampleService.Client(binaryProtocol)
val example = new Example(1, „test")
service.sendNotification(example)
}
and CSharp Client:
class Program
{
static void Main(string[] args)
{
var uri = new Uri("");
var service = new ExampleService.Client(new TBinaryProtocol(new
THttpClient(uri)));
var example = new Example(1, „test");
service.sendNotification(notification);
notificationService.Dispose();
}
}
while the first will work even on chunked transfer encoding, the later will
fail sometimes with a TimeoutException, is this the current behavior or is
Chunked Transfer over HTTP just not supported?
Exception (german, don’t know how I could get an english message), however if I
specify the content-length header it will never fail:
Unbehandelte Ausnahme: Thrift.Transport.TTransportException: Couldn't connect t
server: System.Net.WebException: Timeout für den Vorgang wurde überschritten.
bei System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
bei Thrift.Transport.THttpClient.SendRequest()
bei Thrift.Transport.THttpClient.SendRequest()
bei Thrift.Transport.THttpClient.Flush()
Beste Grüße / Best Regards
Christian Schmitt
smime.p7s
Description: S/MIME cryptographic signature
