HTTP::Request failed on HTTP/1.1 and Connection: Keep-Alive

Ask a Question related to Perl / CGI, Design and Development.

  1. #1

    Default Re: HTTP::Request failed on HTTP/1.1 and Connection: Keep-Alive

    Hi Abigail,
    I know that the error comes from the Java program, the nullpointer error.
    But what it confused me is: if I'm using an Internet Explorer version 5 to
    access the page, it's working fine. If I use HTTP::Request, it'll fail. I tried
    to simulate the headers in the IE's request in HTTP::Request, but I failed to
    make it work. I just wonder if it's because HTTP::Request doesn't support
    HTTP/1.1 and Keep-Alive properly?
    Thanks.

    Regards,
    Simon.

    Abigail <abigail@abigail.nl> wrote in message news:<slrnbhfts1.1e7.abigail@alexandra.abigail.nl> ...
    > Simon Tneoh (simon.tneoh@mybiz.net) wrote on MMMDCVIII September MCMXCIII
    > in <URL:news:a07bdd22.0307180516.3c1d95e2@posting.goo gle.com>:
    > -: Hello all,
    > -: Thanks in advance for any helps provided.
    > -: I try to download a page through GET method with protocol HTTP/1.1
    > -: by
    > -: using HTTP::Request module and it fails.
    >
    > And the error you show us is a Java trace. The Java program makes
    > one of the most common errors in Java programs: nullpointer
    > exception.
    >
    > But Java has *nothing* to do with the charter of this group.
    >
    >
    >
    > Abigail
    Simon Tneoh Guest

  2. Similar Questions and Discussions

    1. The request failed with HTTP status 401: Unauthorized.
      I have a web service that has been working before but now I am getting: The request failed with HTTP status 401: Unauthorized. This is to the...
    2. The request failed with HTTP status 403: Access Forbidden
      I was doing a load testing on web application and got this error from my web service when I increased trxs. anyone knows anything about this? Is...
    3. request failed HTTP status 417
      I wrote a web service and a seperate client program that works fine on the local machine. When I deploy the service to an internet host and try to...
    4. The Request Failed with HTTP Status 401: Access Denied
      I have a webservice that returns a simple string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous...
    5. web chat development, http header connection: keep-alive
      Hi, I'm developing a web chat in asp.net that is composed of two frames. The top frame shows the messages and the bottom one allows the user to...
  3. #2

    Default Re: HTTP::Request failed on HTTP/1.1 and Connection: Keep-Alive

    [email]simon.tneoh@mybiz.net[/email] (Simon Tneoh) shaped the electrons to say:
    >to simulate the headers in the IE's request in HTTP::Request, but I failed to
    >make it work. I just wonder if it's because HTTP::Request doesn't support
    >HTTP/1.1 and Keep-Alive properly?
    I'd probably throw a sniffer at it (like Etherial) - grab the headers
    from the successful IE connect, and the unsuccessful Perl connect, and
    see what differs - then see what I might be able to do to make the
    Perl options resemble the IE configuration.

    Presuming the Java were a black box. (Been there, done that -
    sometimes you *can't* 'fix' the other bit, you just to make your bit
    work with it as is.)

    But if you do have the ability to tweak the Java, add some better
    error handling to at least trap what is going wrong.

    -MZ, CISSP #3762, RHCE #806199299900541
    --
    <URL:mailto:megazone@megazone.org> Gweep, Discordian, Author, Engineer, me..
    "A little nonsense now and then, is relished by the wisest men" 508-755-4098
    <URL:http://www.megazone.org/> <URL:http://www.eyrie-productions.com/> Eris
    MegaZone Guest

  4. #3

    Default Re: HTTP::Request failed on HTTP/1.1 and Connection: Keep-Alive

    [email]simon.tneoh@mybiz.net[/email] (Simon Tneoh) wrote in message news:<a07bdd22.0308041753.2c82307d@posting.google. com>...
    > Hi Abigail,
    > I know that the error comes from the Java program, the nullpointer error.
    > But what it confused me is: if I'm using an Internet Explorer version 5 to
    > access the page, it's working fine. If I use HTTP::Request, it'll fail. I tried
    > to simulate the headers in the IE's request in HTTP::Request, but I failed to
    > make it work. I just wonder if it's because HTTP::Request doesn't support
    > HTTP/1.1 and Keep-Alive properly?
    > Thanks.
    >
    I highly doubt it. I know it is easy to blame the perl end of the
    connection when one sees something like the above, but it is usually
    not the case.

    For instance, developing an asp.net app, my code used the
    HttpContext.Current.Request.UserAgent object from the .NET class
    library. When I made requests via IE or NS, everything was gravy. But
    when I used LWP::Simple to develop a test suite, the app would crash
    saying I was using a null value as an object.

    After stepping through the code with the debugger, I saw
    HttpContext.Current.Request.UserAgent was null when using LWP::Simple.

    HttpContext.Current.Request.UserAgent is a convience object and is by
    no means obligated to be instantiated ( by specification or otherwise
    ).

    So while it was easy to immediately think the problem was in the
    client side perl logic, some digging proved the problem was indeed on
    the server side.

    Todd W.
    trwww Guest

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139