You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ag9 (JIRA)" <ji...@apache.org> on 2011/04/29 10:06:03 UTC

[jira] [Created] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

THttpClient->Flush() issue (connection thru proxy)
--------------------------------------------------

                 Key: THRIFT-1159
                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
             Project: Thrift
          Issue Type: Bug
          Components: C# - Library
         Environment: w2k sp4, .net2
            Reporter: ag9
            Priority: Minor


1) Issue with timeout at the moment of call THttpClient->Flush() when I try to get data thru proxy.
Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
Code:
class Program {
   static void Main(string[] args) {
	Uri uri = new Uri("http://google.com");
	TTransport transport = new THttpClient(uri);
	transport.Flush();
   }
}

At the moment of call the method "transport.Flush();" just goes to sleep forever (in my app). 
Issue is locates in the: file Transport/THttpClient.cs -> method CreateRequest() - > 
code: connection.Proxy = null;

The lib should set state of proxy using some methods like to:
use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
add new property or methods with Proxy object
probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's be able manage state of object inside without usage of some xml config files

2) Timeout period is not set by default.
Actually timeout period set to 0
Code (file Transport/THttpClient.cs):
private int connectTimeout = 0;
private int readTimeout = 0;
Need to set value of timeout by default like 15 seconds instead of infinite interval.

3) HttpWebRequest connection properties sets by default
Code (file Transport/THttpClient.cs -> method CreateRequest()):
connection.ContentType = "application/x-thrift";
connection.Accept = "application/x-thrift";
connection.UserAgent = "C#/THttpClient";
connection.Method = "POST";
connection.ProtocolVersion = HttpVersion.Version10;

But need to have a way to configure it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "ag9 (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ag9 updated THRIFT-1159:
------------------------

    Patch Info: [Patch Available]

> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: ag9
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278497#comment-13278497 ] 

Hudson commented on THRIFT-1159:
--------------------------------

Integrated in Thrift #472 (See [https://builds.apache.org/job/Thrift/472/])
    THRIFT-1159:THttpClient->Flush() issue (connection thru proxy)
Client: csharp
Patch: Joshua Samuel + Alex Gaas

Resolve HttpClient flush issues with proxy. (Revision 1339934)

     Result = ABORTED
jfarrell : http://svn.apache.org/viewvc/?view=rev&rev=1339934
Files : 
* /thrift/trunk/lib/csharp/src/Transport/THttpClient.cs

                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Priority: Minor
>              Labels: thrift
>             Fix For: 0.9
>
>         Attachments: THttpClient.cs, thrift-1325013-THttpClient.cs-for-1159.patch
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1159.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9
         Assignee:     (was: Jake Farrell)

Thanks for rebase, committed
                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Priority: Minor
>              Labels: thrift
>             Fix For: 0.9
>
>         Attachments: THttpClient.cs, thrift-1325013-THttpClient.cs-for-1159.patch
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "ag9 (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ag9 updated THRIFT-1159:
------------------------

           Description: 
*1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
Code:
{code:java} 
class Program {
   static void Main(string[] args) {
	Uri uri = new Uri("http://google.com");
	TTransport transport = new THttpClient(uri);
  	transport.Flush();
   }
}
{code}

At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
code:
{code:java} 
connection.Proxy = null;
{code}

The lib should set state of proxy using some methods like to:
  use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
  add new property or methods with Proxy object
  probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files

*2)* *Timeout period* is not set by default.
Actually timeout period set to *0*
Code (file Transport/THttpClient.cs):
{code:java}
private int connectTimeout = 0;
private int readTimeout = 0;
{code}
Need to set value of timeout by default like *15* seconds instead of infinite interval.

*3)* *HttpWebRequest connection properties* sets by default
Code (file Transport/THttpClient.cs -> method CreateRequest()):
{code:java}
connection.ContentType = "application/x-thrift";
connection.Accept = "application/x-thrift";
connection.UserAgent = "C#/THttpClient";
connection.Method = "POST";
connection.ProtocolVersion = HttpVersion.Version10;
{code}
But need to *have a way to configure* it options thru object or class attributes in client code

  was:
1) Issue with timeout at the moment of call THttpClient->Flush() when I try to get data thru proxy.
Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
Code:
class Program {
   static void Main(string[] args) {
	Uri uri = new Uri("http://google.com");
	TTransport transport = new THttpClient(uri);
	transport.Flush();
   }
}

At the moment of call the method "transport.Flush();" just goes to sleep forever (in my app). 
Issue is locates in the: file Transport/THttpClient.cs -> method CreateRequest() - > 
code: connection.Proxy = null;

The lib should set state of proxy using some methods like to:
use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
add new property or methods with Proxy object
probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's be able manage state of object inside without usage of some xml config files

2) Timeout period is not set by default.
Actually timeout period set to 0
Code (file Transport/THttpClient.cs):
private int connectTimeout = 0;
private int readTimeout = 0;
Need to set value of timeout by default like 15 seconds instead of infinite interval.

3) HttpWebRequest connection properties sets by default
Code (file Transport/THttpClient.cs -> method CreateRequest()):
connection.ContentType = "application/x-thrift";
connection.Accept = "application/x-thrift";
connection.UserAgent = "C#/THttpClient";
connection.Method = "POST";
connection.ProtocolVersion = HttpVersion.Version10;

But need to have a way to configure it options thru object or class attributes in client code

    Remaining Estimate: 12h  (was: 0.2h)
     Original Estimate: 12h  (was: 0.2h)

> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: ag9
>            Priority: Minor
>              Labels: thrift
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell reassigned THRIFT-1159:
------------------------------------

    Assignee: Jake Farrell
    
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Assignee: Jake Farrell
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "alex_gs (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277564#comment-13277564 ] 

alex_gs commented on THRIFT-1159:
---------------------------------

Also please check a https://issues.apache.org/jira/browse/THRIFT-1162 issue and fix inside. By the way, why issues/fixes not check so long time? I have a really bunch of bugs and fixes with thrift but did not want commit it here because thought the project "in decline".
                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Assignee: Jake Farrell
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Joshua Samuel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Samuel updated THRIFT-1159:
----------------------------------

    Attachment: thrift-1325013-THttpClient.cs-for-1159.patch

Patch based on alex_gs's THttpClient.cs + default to system/config file default proxy, rather than NULL to allow app config file to set the proxy correctly.
                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Assignee: Jake Farrell
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs, thrift-1325013-THttpClient.cs-for-1159.patch
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "ag9 (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ag9 updated THRIFT-1159:
------------------------

    Attachment: THttpClient.cs

Extensions/ pathes for THttpClient.cs:

- the property (setter) *Proxy* for configuring proxy in client code
Sample:
{code:java}
Uri uri = new Uri("http://localhost:3968/TimeServerSample/post.ashx");
THttpClient transport = new THttpClient(uri);
transport.Proxy = WebRequest.DefaultWebProxy;
{code}

- *timeouts is set* like 30 seconds (for connect and read time)
- inside private method CreateRequest() I've added to object connection (of type HttpWebRequest)
couple of properties *(value as false) - Expect100Continue & UseNagleAlgorithm*. It's allow to extend
perfomance regarding old version (basically) twice

> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: ag9
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277539#comment-13277539 ] 

Jake Farrell commented on THRIFT-1159:
--------------------------------------

Joshua, can you submit a patch against current trunk for this rather than the actual file (http://thrift.apache.org/docs/HowToContribute/)
                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "ag9 (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029736#comment-13029736 ] 

ag9 commented on THRIFT-1159:
-----------------------------

Fixed version of *THttpClient.cs* above *in attachment*

> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: ag9
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Joshua Samuel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277501#comment-13277501 ] 

Joshua Samuel commented on THRIFT-1159:
---------------------------------------

How do we get this patch integrated into the main source?  It appears to have been sitting here is a patch for 1 year.  
This patch fixes my issue in trying to use the API behind a corporate firewall/Web Proxy.
                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1159) THttpClient->Flush() issue (connection thru proxy)

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277579#comment-13277579 ] 

Jake Farrell commented on THRIFT-1159:
--------------------------------------

Alex, I can assure you that Thrift is active and I have been creating releases around every 3-4 months (0.9rc coming shortly). Since the beginning of the this year we have added 2 new libraries, updated the website, resolved ~100 tickets and taken care of some Apache internal house keeping. 

Please attach patches to the tickets with asf inclusion rather than whole files like in this ticket and in Thrift-1162. See http://thrift.apache.org/docs/HowToContribute/
                
> THttpClient->Flush() issue (connection thru proxy)
> --------------------------------------------------
>
>                 Key: THRIFT-1159
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1159
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>         Environment: w2k sp4, .net2
>            Reporter: alex_gs
>            Assignee: Jake Farrell
>            Priority: Minor
>              Labels: thrift
>         Attachments: THttpClient.cs
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> *1)* Issue with *timeout* at the moment of call *THttpClient->Flush()* when I try to get data thru *proxy*.
> Prerequestites: clent(c# thrift) before proxy, we resource (in my case http://google.com)
> Code:
> {code:java} 
> class Program {
>    static void Main(string[] args) {
> 	Uri uri = new Uri("http://google.com");
> 	TTransport transport = new THttpClient(uri);
>   	transport.Flush();
>    }
> }
> {code}
> At the moment of call the method *transport.Flush();* just goes to sleep forever (in my app). 
> Issue is locates in the: file *Transport/THttpClient.cs -> method CreateRequest()*  
> code:
> {code:java} 
> connection.Proxy = null;
> {code}
> The lib should set state of proxy using some methods like to:
>   use default proxy - property WebRequest.DefaultWebProxy from namespace System.Net
>   add new property or methods with Proxy object
>   probably use a method of declaring an attribute in C# - to write own custom attribute(s) for class THttpClient; it's   be able manage state of object inside without usage of some xml config files
> *2)* *Timeout period* is not set by default.
> Actually timeout period set to *0*
> Code (file Transport/THttpClient.cs):
> {code:java}
> private int connectTimeout = 0;
> private int readTimeout = 0;
> {code}
> Need to set value of timeout by default like *15* seconds instead of infinite interval.
> *3)* *HttpWebRequest connection properties* sets by default
> Code (file Transport/THttpClient.cs -> method CreateRequest()):
> {code:java}
> connection.ContentType = "application/x-thrift";
> connection.Accept = "application/x-thrift";
> connection.UserAgent = "C#/THttpClient";
> connection.Method = "POST";
> connection.ProtocolVersion = HttpVersion.Version10;
> {code}
> But need to *have a way to configure* it options thru object or class attributes in client code

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira