http bug

Discussion in 'Java' started by Roedy Green, Jan 20, 2010.

  1. Roedy Green

    Roedy Green Guest

    I have noticed a program that has worked for a long time now just
    freezes as if it had a infinite timeout on HTTP GETs. This started
    happening with JDK 1,6.0_18. Has anyone else noticed this?
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming .
    Roedy Green, Jan 20, 2010
    #1
    1. Advertising

  2. Roedy Green wrote:

    > I have noticed a program that has worked for a long time now just
    > freezes as if it had a infinite timeout on HTTP GETs. This started
    > happening with JDK 1,6.0_18. Has anyone else noticed this?


    Until 1.5. AFAIR there was no setting in HttpUrlConnection
    allowing you to reduce the timeout to something lower than
    infinity, forcing you to do some workarounds to get a timeout
    when connecting or working with Sockets created with
    HttpUrlConnection (I assume you are talking about HttpUrlConnection).

    Assuming specific timeout-settings is always a bad idea, so you
    should set a timeout for yourself instead of hoping that the
    default behavior of a VM keeps the same all time.


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
    Lothar Kimmeringer, Jan 20, 2010
    #2
    1. Advertising

  3. Roedy Green

    Lew Guest

    Roedy Green wrote:
    >> I have noticed a program that has worked for a long time now just
    >> freezes as if it had a infinite timeout on HTTP GETs.  This started
    >> happening with JDK 1,6.0_18.  Has anyone else noticed this?

    >


    Lothar Kimmeringer <> wrote:
    > Until 1.5. AFAIR there was no setting in HttpUrlConnection
    > allowing you to reduce the timeout to something lower than
    > infinity, forcing you to do some workarounds to get a timeout
    > when connecting or working with Sockets created with
    > HttpUrlConnection (I assume you are talking about HttpUrlConnection).
    >


    You know what you get when you assume. The OP provided a dearth of
    information about exactly what he's doing. Perhaps he might consider
    sharing the details, or even providing an SSCCE.

    > Assuming specific timeout-settings is always a bad idea, so you
    > should set a timeout for yourself instead of hoping that the
    > default behavior of a VM keeps the same all time.
    >


    --
    Lew
    Lew, Jan 20, 2010
    #3
  4. Roedy Green

    Daniel Pitts Guest

    Lothar Kimmeringer wrote:
    > Roedy Green wrote:
    >
    >> I have noticed a program that has worked for a long time now just
    >> freezes as if it had a infinite timeout on HTTP GETs. This started
    >> happening with JDK 1,6.0_18. Has anyone else noticed this?

    >
    > Until 1.5. AFAIR there was no setting in HttpUrlConnection
    > allowing you to reduce the timeout to something lower than
    > infinity, forcing you to do some workarounds to get a timeout
    > when connecting or working with Sockets created with
    > HttpUrlConnection (I assume you are talking about HttpUrlConnection).
    >
    > Assuming specific timeout-settings is always a bad idea, so you
    > should set a timeout for yourself instead of hoping that the
    > default behavior of a VM keeps the same all time.
    >
    >
    > Regards, Lothar

    I often find the standard HttpUrlConnection lacking, and usually go with
    apache commons HttpClient instead. You have more control of the
    process, if you care, but it also "works" out-of-the-box if you don't
    want to configure it as much.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Jan 20, 2010
    #4
  5. Daniel Pitts wrote:

    > I often find the standard HttpUrlConnection lacking, and usually go with
    > apache commons HttpClient instead. You have more control of the
    > process, if you care, but it also "works" out-of-the-box if you don't
    > want to configure it as much.


    The last time I checked, GetMethod and PostMethod were two
    classes sharing a lot of methods but not a common superclass.
    So you end up with code like this

    if (performGet) {
    methodGet = new GetMethod(host + url);
    methodGet.setQueryString(query);
    methodGet.setDoAuthentication(authNeeded);
    methodGet.getParams().setParameter("http.socket.timeout",
    Integer.valueOf(timeout));
    methodGet.getParams().setParameter(
    HttpMethodParams.RETRY_HANDLER, retryhandler);
    methodGet.setRequestHeader("Connection", "keep-alive");
    methodGet.setRequestHeader("Cache-Control", "no-cache");
    }
    else {
    methodPost = new PostMethod(host + url);
    methodPost.setRequestHeader("Connection", "keep-alive");
    methodPost.setDoAuthentication(authNeeded);
    methodPost.getParams().setParameter("http.socket.timeout",
    Integer.valueOf(timeout));
    methodPost.getParams().setParameter(
    HttpMethodParams.RETRY_HANDLER, retryhandler);
    methodPost.setRequestHeader("Cache-Control", "no-cache");
    }
    if (methodGet != null){
    statuscode = client.executeMethod(methodGet);
    }
    else{
    statuscode = client.executeMethod(methodPost);
    }

    and so on. If you have a specific HTTP-session to handle
    programmatically, HttpClient is nice, but if you have to
    build different HTTP-requests in dependence of external
    configurations, you have a lot of duplicate code that
    is prone to errors.


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
    Lothar Kimmeringer, Jan 20, 2010
    #5
  6. Roedy Green

    Daniel Pitts Guest

    Lothar Kimmeringer wrote:
    > Daniel Pitts wrote:
    >
    >> I often find the standard HttpUrlConnection lacking, and usually go with
    >> apache commons HttpClient instead. You have more control of the
    >> process, if you care, but it also "works" out-of-the-box if you don't
    >> want to configure it as much.

    >
    > The last time I checked, GetMethod and PostMethod were two
    > classes sharing a lot of methods but not a common superclass.
    > So you end up with code like this
    >
    > if (performGet) {
    > methodGet = new GetMethod(host + url);
    > methodGet.setQueryString(query);
    > methodGet.setDoAuthentication(authNeeded);
    > methodGet.getParams().setParameter("http.socket.timeout",
    > Integer.valueOf(timeout));
    > methodGet.getParams().setParameter(
    > HttpMethodParams.RETRY_HANDLER, retryhandler);
    > methodGet.setRequestHeader("Connection", "keep-alive");
    > methodGet.setRequestHeader("Cache-Control", "no-cache");
    > }
    > else {
    > methodPost = new PostMethod(host + url);
    > methodPost.setRequestHeader("Connection", "keep-alive");
    > methodPost.setDoAuthentication(authNeeded);
    > methodPost.getParams().setParameter("http.socket.timeout",
    > Integer.valueOf(timeout));
    > methodPost.getParams().setParameter(
    > HttpMethodParams.RETRY_HANDLER, retryhandler);
    > methodPost.setRequestHeader("Cache-Control", "no-cache");
    > }
    > if (methodGet != null){
    > statuscode = client.executeMethod(methodGet);
    > }
    > else{
    > statuscode = client.executeMethod(methodPost);
    > }
    >
    > and so on. If you have a specific HTTP-session to handle
    > programmatically, HttpClient is nice, but if you have to
    > build different HTTP-requests in dependence of external
    > configurations, you have a lot of duplicate code that
    > is prone to errors.
    >
    >
    > Regards, Lothar

    Last time I checked, they both implement HttpMethod and are derived from
    HttpMethodBase. Perhaps you had a really old version, or misinterpreted
    something else.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Jan 20, 2010
    #6
  7. Roedy Green

    Lew Guest

    Lothar Kimmeringer wrote:
    >> The last time I checked, GetMethod and PostMethod were two
    >> classes sharing a lot of methods but not a common superclass.
    >> So you end up with code like this
    >>
    >> if (performGet) {
    >>   methodGet = new GetMethod(host + url);
    >>   methodGet.setQueryString(query);
    >>   methodGet.setDoAuthentication(authNeeded);
    >>   methodGet.getParams().setParameter("http.socket.timeout",
    >>    Integer.valueOf(timeout));
    >>   methodGet.getParams().setParameter(
    >>    HttpMethodParams.RETRY_HANDLER, retryhandler);
    >>   methodGet.setRequestHeader("Connection", "keep-alive");
    >>   methodGet.setRequestHeader("Cache-Control", "no-cache");
    >> }
    >> else {
    >>   methodPost = new PostMethod(host + url);
    >>   methodPost.setRequestHeader("Connection", "keep-alive");
    >>   methodPost.setDoAuthentication(authNeeded);
    >>   methodPost.getParams().setParameter("http.socket.timeout",
    >>    Integer.valueOf(timeout));
    >>   methodPost.getParams().setParameter(
    >>    HttpMethodParams.RETRY_HANDLER, retryhandler);
    >>   methodPost.setRequestHeader("Cache-Control", "no-cache");
    >> }
    >> if (methodGet != null){
    >>   statuscode = client.executeMethod(methodGet);
    >> }
    >> else{
    >>   statuscode = client.executeMethod(methodPost);
    >> }
    >>
    >> and so on. If you have a specific HTTP-session to handle
    >> programmatically, HttpClient is nice, but if you have to
    >> build different HTTP-requests in dependence of external
    >> configurations, you have a lot of duplicate code that
    >> is prone to errors.

    >


    Daniel Pitts wrote:
    > Last time I checked, they both implement HttpMethod and are derived from
    > HttpMethodBase.  Perhaps you had a really old version, or misinterpreted
    > something else.
    >


    I'm not seeing either one, nor 'HttpMethodBase', nor 'HttpMethod' in
    the HttpClient Javadocs. I find 'HttpGet' and 'HttpPost', which
    inherit from 'HttpRequestBase' and implement 'HttpMessage', and seem
    roughly equivalent to what you're talking about.
    <http://hc.apache.org/httpcomponents-client/httpclient/apidocs/
    index.html>

    From <http://hc.apache.org/>:
    "HttpComponents Client is a successor of and replacement for Commons
    HttpClient 3.x. Users of Commons HttpClient are strongly encouraged to
    upgrade. ...
    "Commons HttpClient 3.x codeline is nearing the end of life. All users
    of Commons HttpClient 3.x are strongly encouraged to upgrade to
    HttpClient 4.0."

    --
    Lew
    Lew, Jan 20, 2010
    #7
  8. Roedy Green

    Daniel Pitts Guest

    Lew wrote:
    > Lothar Kimmeringer wrote:
    >>> The last time I checked, GetMethod and PostMethod were two
    >>> classes sharing a lot of methods but not a common superclass.
    >>> So you end up with code like this
    >>>
    >>> if (performGet) {
    >>> methodGet = new GetMethod(host + url);
    >>> methodGet.setQueryString(query);
    >>> methodGet.setDoAuthentication(authNeeded);
    >>> methodGet.getParams().setParameter("http.socket.timeout",
    >>> Integer.valueOf(timeout));
    >>> methodGet.getParams().setParameter(
    >>> HttpMethodParams.RETRY_HANDLER, retryhandler);
    >>> methodGet.setRequestHeader("Connection", "keep-alive");
    >>> methodGet.setRequestHeader("Cache-Control", "no-cache");
    >>> }
    >>> else {
    >>> methodPost = new PostMethod(host + url);
    >>> methodPost.setRequestHeader("Connection", "keep-alive");
    >>> methodPost.setDoAuthentication(authNeeded);
    >>> methodPost.getParams().setParameter("http.socket.timeout",
    >>> Integer.valueOf(timeout));
    >>> methodPost.getParams().setParameter(
    >>> HttpMethodParams.RETRY_HANDLER, retryhandler);
    >>> methodPost.setRequestHeader("Cache-Control", "no-cache");
    >>> }
    >>> if (methodGet != null){
    >>> statuscode = client.executeMethod(methodGet);
    >>> }
    >>> else{
    >>> statuscode = client.executeMethod(methodPost);
    >>> }
    >>>
    >>> and so on. If you have a specific HTTP-session to handle
    >>> programmatically, HttpClient is nice, but if you have to
    >>> build different HTTP-requests in dependence of external
    >>> configurations, you have a lot of duplicate code that
    >>> is prone to errors.

    >
    > Daniel Pitts wrote:
    >> Last time I checked, they both implement HttpMethod and are derived from
    >> HttpMethodBase. Perhaps you had a really old version, or misinterpreted
    >> something else.
    >>

    >
    > I'm not seeing either one, nor 'HttpMethodBase', nor 'HttpMethod' in
    > the HttpClient Javadocs. I find 'HttpGet' and 'HttpPost', which
    > inherit from 'HttpRequestBase' and implement 'HttpMessage', and seem
    > roughly equivalent to what you're talking about.
    > <http://hc.apache.org/httpcomponents-client/httpclient/apidocs/
    > index.html>
    >
    > From <http://hc.apache.org/>:
    > "HttpComponents Client is a successor of and replacement for Commons
    > HttpClient 3.x. Users of Commons HttpClient are strongly encouraged to
    > upgrade. ...
    > "Commons HttpClient 3.x codeline is nearing the end of life. All users
    > of Commons HttpClient 3.x are strongly encouraged to upgrade to
    > HttpClient 4.0."
    >
    > --
    > Lew

    Our codebase has been using HttpClient 3.1, so that is why the
    discrepancy.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Jan 21, 2010
    #8
  9. Roedy Green

    Arne Vajhøj Guest

    On 20-01-2010 14:53, Lothar Kimmeringer wrote:
    > Daniel Pitts wrote:
    >> I often find the standard HttpUrlConnection lacking, and usually go with
    >> apache commons HttpClient instead. You have more control of the
    >> process, if you care, but it also "works" out-of-the-box if you don't
    >> want to configure it as much.

    >
    > The last time I checked, GetMethod and PostMethod were two
    > classes sharing a lot of methods but not a common superclass.


    Sure?

    HttpClient 2.0.2 has a common super class.

    > So you end up with code like this
    >
    > if (performGet) {
    > methodGet = new GetMethod(host + url);
    > methodGet.setQueryString(query);
    > methodGet.setDoAuthentication(authNeeded);
    > methodGet.getParams().setParameter("http.socket.timeout",
    > Integer.valueOf(timeout));
    > methodGet.getParams().setParameter(
    > HttpMethodParams.RETRY_HANDLER, retryhandler);
    > methodGet.setRequestHeader("Connection", "keep-alive");
    > methodGet.setRequestHeader("Cache-Control", "no-cache");
    > }
    > else {
    > methodPost = new PostMethod(host + url);
    > methodPost.setRequestHeader("Connection", "keep-alive");
    > methodPost.setDoAuthentication(authNeeded);
    > methodPost.getParams().setParameter("http.socket.timeout",
    > Integer.valueOf(timeout));
    > methodPost.getParams().setParameter(
    > HttpMethodParams.RETRY_HANDLER, retryhandler);
    > methodPost.setRequestHeader("Cache-Control", "no-cache");
    > }


    > and so on. If you have a specific HTTP-session to handle
    > programmatically, HttpClient is nice, but if you have to
    > build different HTTP-requests in dependence of external
    > configurations, you have a lot of duplicate code that
    > is prone to errors.


    Most HTTP request receivers are either POST or GET anyway.

    I can not imagine sending the exact same data to an URL
    just with different method should be that common.

    Arne
    Arne Vajhøj, Jan 21, 2010
    #9
  10. Roedy Green

    Arne Vajhøj Guest

    On 20-01-2010 18:34, Lew wrote:
    > Lothar Kimmeringer wrote:
    >>> The last time I checked, GetMethod and PostMethod were two
    >>> classes sharing a lot of methods but not a common superclass.
    >>> So you end up with code like this
    >>>
    >>> if (performGet) {
    >>> methodGet = new GetMethod(host + url);
    >>> methodGet.setQueryString(query);
    >>> methodGet.setDoAuthentication(authNeeded);
    >>> methodGet.getParams().setParameter("http.socket.timeout",
    >>> Integer.valueOf(timeout));
    >>> methodGet.getParams().setParameter(
    >>> HttpMethodParams.RETRY_HANDLER, retryhandler);
    >>> methodGet.setRequestHeader("Connection", "keep-alive");
    >>> methodGet.setRequestHeader("Cache-Control", "no-cache");
    >>> }
    >>> else {
    >>> methodPost = new PostMethod(host + url);
    >>> methodPost.setRequestHeader("Connection", "keep-alive");
    >>> methodPost.setDoAuthentication(authNeeded);
    >>> methodPost.getParams().setParameter("http.socket.timeout",
    >>> Integer.valueOf(timeout));
    >>> methodPost.getParams().setParameter(
    >>> HttpMethodParams.RETRY_HANDLER, retryhandler);
    >>> methodPost.setRequestHeader("Cache-Control", "no-cache");
    >>> }
    >>> if (methodGet != null){
    >>> statuscode = client.executeMethod(methodGet);
    >>> }
    >>> else{
    >>> statuscode = client.executeMethod(methodPost);
    >>> }
    >>>
    >>> and so on. If you have a specific HTTP-session to handle
    >>> programmatically, HttpClient is nice, but if you have to
    >>> build different HTTP-requests in dependence of external
    >>> configurations, you have a lot of duplicate code that
    >>> is prone to errors.

    >>

    >
    > Daniel Pitts wrote:
    >> Last time I checked, they both implement HttpMethod and are derived from
    >> HttpMethodBase. Perhaps you had a really old version, or misinterpreted
    >> something else.

    >
    > I'm not seeing either one, nor 'HttpMethodBase', nor 'HttpMethod' in
    > the HttpClient Javadocs. I find 'HttpGet' and 'HttpPost', which
    > inherit from 'HttpRequestBase' and implement 'HttpMessage', and seem
    > roughly equivalent to what you're talking about.
    > <http://hc.apache.org/httpcomponents-client/httpclient/apidocs/
    > index.html>


    Which you explain yourself:

    > From<http://hc.apache.org/>:
    > "HttpComponents Client is a successor of and replacement for Commons
    > HttpClient 3.x. Users of Commons HttpClient are strongly encouraged to
    > upgrade. ...
    > "Commons HttpClient 3.x codeline is nearing the end of life. All users
    > of Commons HttpClient 3.x are strongly encouraged to upgrade to
    > HttpClient 4.0."


    Version 4.0 is relative new.

    And the completely broke existing code, so a lot of people
    will use 2.x and 3.x for a long time, because they don't
    want to rewrite the code.

    Arne
    Arne Vajhøj, Jan 21, 2010
    #10
  11. Roedy Green

    Roedy Green Guest

    On Wed, 20 Jan 2010 08:44:07 -0800 (PST), Lew <>
    wrote, quoted or indirectly quoted someone who said :

    >You know what you get when you assume. The OP provided a dearth of
    >information about exactly what he's doing. Perhaps he might consider
    >sharing the details, or even providing an SSCCE.


    The code is posted at http://mindprod.com/products1.html#VERCHECK

    When I get a round tuit, I will prune this back to a SSCCE.

    I was hoping someone else was having the problem and had solved it or
    had read a post somewhere about timeouts not behaving the way they use
    to.

    Oddly, when I run the program a second time, usually it completes the
    read immediately and successfully. This may be a Windows 7 64-bit
    problem. I have found rebooting Win 7 often clears up a multitude of
    strange behaviours.

    The problem is not reproducible, the nastiest kind.

    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming .
    Roedy Green, Jan 21, 2010
    #11
  12. Roedy Green

    Roedy Green Guest

    On Wed, 20 Jan 2010 20:53:03 +0100, Lothar Kimmeringer
    <> wrote, quoted or indirectly quoted someone
    who said :

    >The last time I checked, GetMethod and PostMethod were two
    >classes sharing a lot of methods but not a common superclass.
    >So you end up with code like this


    Are you complaining about Sun or Apache?
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming .
    Roedy Green, Jan 21, 2010
    #12
  13. Roedy Green

    Arne Vajhøj Guest

    On 20-01-2010 20:17, Roedy Green wrote:
    > On Wed, 20 Jan 2010 08:44:07 -0800 (PST), Lew<>
    > wrote, quoted or indirectly quoted someone who said :
    >> You know what you get when you assume. The OP provided a dearth of
    >> information about exactly what he's doing. Perhaps he might consider
    >> sharing the details, or even providing an SSCCE.

    >
    > The code is posted at http://mindprod.com/products1.html#VERCHECK
    >
    > When I get a round tuit, I will prune this back to a SSCCE.
    >
    > I was hoping someone else was having the problem and had solved it or
    > had read a post somewhere about timeouts not behaving the way they use
    > to.
    >
    > Oddly, when I run the program a second time, usually it completes the
    > read immediately and successfully.


    Sounds more like a very slow DNS server and your immediate DNS server
    having the name cached the second time.

    Arne
    Arne Vajhøj, Jan 21, 2010
    #13
  14. Roedy Green

    Arne Vajhøj Guest

    On 20-01-2010 20:18, Roedy Green wrote:
    > On Wed, 20 Jan 2010 20:53:03 +0100, Lothar Kimmeringer
    > <> wrote, quoted or indirectly quoted someone
    > who said :
    >> The last time I checked, GetMethod and PostMethod were two
    >> classes sharing a lot of methods but not a common superclass.
    >> So you end up with code like this

    >
    > Are you complaining about Sun or Apache?


    Given that the code was explicit stated to be Apache, then
    complaining to SUN would not make much sense.

    Arne
    Arne Vajhøj, Jan 21, 2010
    #14
  15. Roedy Green

    Roedy Green Guest

    On Wed, 20 Jan 2010 20:23:35 -0500, Arne Vajhøj <>
    wrote, quoted or indirectly quoted someone who said :

    >Given that the code was explicit stated to be Apache, then
    >complaining to SUN would not make much sense.


    He was not explicit. If you know that GetMethod and PostMethod are
    unique to Apache, you could infer that. But Lothar did not state it
    explicitly. The audience is wider than those who post. It always
    helps to make things abundantly clear.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming .
    Roedy Green, Jan 21, 2010
    #15
  16. Roedy Green

    Roedy Green Guest

    On Wed, 20 Jan 2010 20:21:59 -0500, Arne Vajhøj <>
    wrote, quoted or indirectly quoted someone who said :

    >Sounds more like a very slow DNS server and your immediate DNS server
    >having the name cached the second time.


    Should not the GET timeout if the DNS server takes 4 minutes?
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
    ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming .
    Roedy Green, Jan 21, 2010
    #16
  17. Roedy Green

    Lew Guest

    Arne Vajhøj wrote, quoted or indirectly quoted someone who said :
    >> Given that the code was explicit stated to be Apache, then
    >> complaining to SUN would not make much sense.



    Roedy Green wrote:
    > He was not explicit. If you know that GetMethod and PostMethod are
    > unique to Apache, you could infer that. But Lothar did not state it
    > explicitly. The audience is wider than those who post. It always
    > helps to make things abundantly clear.


    Lothar wasn't explicit, but Arne didn't say it was Lothar. Daniel was
    explicit, in the post to which Lothar responded.

    --
    Lew
    Lew, Jan 21, 2010
    #17
  18. Roedy Green wrote:

    > On Wed, 20 Jan 2010 20:23:35 -0500, Arne Vajhøj <>
    > wrote, quoted or indirectly quoted someone who said :
    >
    >>Given that the code was explicit stated to be Apache, then
    >>complaining to SUN would not make much sense.

    >
    > He was not explicit. If you know that GetMethod and PostMethod are
    > unique to Apache, you could infer that.


    Reading the quoted text of a post often helps. I was answering to
    | I often find the standard HttpUrlConnection lacking, and usually go with
    | apache commons HttpClient instead.

    > But Lothar did not state it
    > explicitly. The audience is wider than those who post. It always
    > helps to make things abundantly clear.


    I'm quite sure that most of the lurkers were also able to
    tell, what framework I was ranting about. ;-)


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
    Lothar Kimmeringer, Jan 21, 2010
    #18
  19. Arne Vajhøj wrote:

    > On 20-01-2010 14:53, Lothar Kimmeringer wrote:
    >
    >> The last time I checked, GetMethod and PostMethod were two
    >> classes sharing a lot of methods but not a common superclass.

    >
    > Sure?
    >
    > HttpClient 2.0.2 has a common super class.


    As I said: "The last time I checked" It's been quite a while
    now, deciding to use HttpUrlConnection instead for implementing
    my AS2-Connector. The code I posted was taken from another
    application developed by a coworker. Since my decision I never
    came back to the point of reconsideration because all the
    features of HttpClient I in general don't need.


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
    Lothar Kimmeringer, Jan 21, 2010
    #19
  20. Roedy Green

    Lew Guest

    On Jan 21, 12:16 pm, >
    Lothar Kimmeringer wrote:
    >>> The last time I checked, GetMethod and PostMethod were two
    >>> classes sharing a lot of methods but not a common superclass.


    Arne Vajhøj wrote:
    >> Sure?

    >
    >> HttpClient 2.0.2 has a common super class.

    >


    Lothar Kimmeringer wrote:
    > As I said: "The last time I checked" It's been quite a while now,
    >


    Really must have been quite a while, given that the April 25, 2001,
    revision of 'GetMethod', marked "initial revision", and the same-date
    version of 'PostMethod', also marked "initial revision", both inherit
    from 'HttpMethodBase'; in fact, that version of 'PostMethod' directly
    inherits from 'GetMethod'.

    Given that "HttpClient was started in 2001 as a subproject of the
    Jakarta Commons,"
    <http://hc.apache.org/httpclient-3.x/index.html>
    I don't think you could have been using it much earlier than that.

    --
    Lew
    Lew, Jan 21, 2010
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    0
    Views:
    797
    Jiong Feng
    Nov 19, 2003
  2. Paul Glavich [MVP - ASP.NET]
    Replies:
    0
    Views:
    440
    Paul Glavich [MVP - ASP.NET]
    Jun 20, 2004
  3. T. Regan
    Replies:
    3
    Views:
    699
    T. Regan
    Jun 21, 2004
  4. NNTP
    Replies:
    2
    Views:
    970
    =?Utf-8?B?S2V2aW4gVG9kZA==?=
    Mar 18, 2005
  5. larkpics
    Replies:
    9
    Views:
    8,977
    Patrick.O.Ige
    Oct 22, 2005
Loading...

Share This Page