HTTP GET not working ...why?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yef

    HTTP GET not working ...why?

    I've got a program that accesses the following URL
    with a GET command but the server responds with 400.
    Is there something unusual about this site?

    Thanks.



  • EventHelix.com

    #2
    Re: HTTP GET not working ...why?

    The web server might be rejecting the program because of
    unknown browser type. The site is flash based so it must be
    checking for browser compatibility.

    I would recommend using Ethereal to check the difference
    between the HTTP get sent by a regular browser and your
    program.

    Deepa
    --
    EventStudio 2.5 - http://www.EventHelix.com/EventStudio
    Generate protocol sequence diagrams in PDF and MS Word

    Comment

    • Barry Margolin

      #3
      Re: HTTP GET not working ...why?

      In article <1110420301.779 955.185330@o13g 2000cwo.googleg roups.com>,
      "Yef" <e97y@yahoo.com > wrote:
      [color=blue]
      > I've got a program that accesses the following URL
      > with a GET command but the server responds with 400.
      > Is there something unusual about this site?
      >
      > Thanks.
      >
      > http://www.nasa.gov/externalflash/An..._noaccess.html[/color]

      Are you sending the "Host: www.nasa.gov" header? I get a 400 response
      if I leave it out, but the GET works when I put it in.

      The server is presumably doing virtual hosting, so it needs to know the
      hostname of the URL in order to find the proper page.

      --
      Barry Margolin, barmar@alum.mit .edu
      Arlington, MA
      *** PLEASE post questions in newsgroups, not directly to me ***

      Comment

      • Yef

        #4
        Re: HTTP GET not working ...why?

        I wasn't sending Host.

        Incidentally, I've got another bizarre host:



        It sends back HTML which doesn't look like what later
        appears in the browser, e.g. title= MakeZine.com

        Do you have any idea what's going on with that?
        Thanks.

        Comment

        • Adrienne

          #5
          Re: HTTP GET not working ...why?

          Gazing into my crystal ball I observed "Yef" <e97y@yahoo.com > writing in
          news:1110424562 .187552.176510@ l41g2000cwc.goo glegroups.com:
          [color=blue]
          > I wasn't sending Host.
          >
          > Incidentally, I've got another bizarre host:
          >
          > http://www.oreilly.com/openbook/webclient/ch03.html
          >
          > It sends back HTML which doesn't look like what later
          > appears in the browser, e.g. title= MakeZine.com
          >
          > Do you have any idea what's going on with that?
          > Thanks.
          >[/color]

          Sounds like you might have been hijacked. If you're on a windows system,
          take a look at your hosts file and see if there is anything suspicious in
          it. See <http://www.mvps.org/winhelp2002/hosts.htm> for more info. Also
          run a spyware checker, Spybot Search & Destroy is very good
          <http://security.kolla. de/>, and I would also run a virus check.

          --
          Adrienne Boswell
          Arbpen Consulting will help you harness valuable insights and translate them into tangible results by merging data and strategy.

          Please respond to the group so others can share

          Comment

          • Yef

            #6
            Re: HTTP GET not working ...why?

            Nope, that's not it. Incidentally does Windows have an equivalent
            to Linux's /etc/hosts.deny?

            Thanks.

            Comment

            • Barry Margolin

              #7
              Re: HTTP GET not working ...why?

              In article <1110511503.759 355.62070@o13g2 000cwo.googlegr oups.com>,
              "Yef" <e97y@yahoo.com > wrote:
              [color=blue]
              > Nope, that's not it.[/color]

              Please learn how to quote the message you're responding to with the new
              Google. It's in an Options menu I think.

              I just did:

              telnet www.oreilly.com 80
              GET /openbook/webclient/ch03.html HTTP/1.0
              Host: www.oreilly.com

              and the HTML it sent looked like it would produce the page I saw with my
              browser. It began with:

              HTTP/1.1 200 OK
              Date: Fri, 11 Mar 2005 03:50:30 GMT
              Server: Apache/1.3.33 (Unix) PHP/4.3.10 mod_perl/1.29
              P3P: policyref="http ://www.oreillynet. com/w3c/p3p.xml",CP="CA O DSP COR
              CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa CONo OUR DELa PUBi OTRa IND PHY
              ONL UNI PUR COM NAV INT DEM CNT STA PRE"
              Last-Modified: Fri, 09 May 2003 19:30:53 GMT
              ETag: "2fbbe-1b80d-3ebc01ed"
              Accept-Ranges: bytes
              Content-Length: 112653
              Content-Type: text/html
              X-Cache: MISS from www.oreilly.com
              Connection: close

              <HTML>
              <HEAD>
              <title>Web Client Programming with Perl: Chapter 3: Learning HTTP</title>
              </head>
              [color=blue]
              > Incidentally does Windows have an equivalent
              > to Linux's /etc/hosts.deny?[/color]

              I don't think so, but I'm not a Windows expert.

              --
              Barry Margolin, barmar@alum.mit .edu
              Arlington, MA
              *** PLEASE post questions in newsgroups, not directly to me ***

              Comment

              Working...