Response server with telnet not matches with response server to browser

Response server with telnet not matches with response server to browser

Post by Elena Sotel » Thu, 27 Aug 1998 04:00:00



Hi, all!

    I'm trying to do an broken link detector in UNIX. Well, my program
runs well, but I have a problem.

    When it connects to the server which haves the URL specificated, it
returns me: "403 Forbidden", but when I, from the browser, check the URL
it connects well.

    Any suggest?

    My code is:

    // Parse the url -> Obtains the host, and the url requested
    ...
    // Open the socket whit AF_INET options
    ...
    // Connect to the server
    ...
    sprintf(msg, "GET /%s HTTP/1.0\n\n",
url_requested_whithout_the_host);
    // Send the request...

    ....

    // Waits for response
   ...

    Must I do any thing else? What is wrong in the request?

    Note: I tried to do this with a telnet and it fails, too !!!

    Thanks in advance,

--
Elena Sotelo

IP Multimedia, S.L.
Marina, 16-18 Pl. 18
Telf: (93) 225 99 80
Fax:  (93) 225 99 81

 
 
 

Response server with telnet not matches with response server to browser

Post by John Gord » Thu, 27 Aug 1998 04:00:00



>    I'm trying to do an broken link detector in UNIX. Well, my program
>runs well, but I have a problem.
>    When it connects to the server which haves the URL specificated, it
>returns me: "403 Forbidden", but when I, from the browser, check the URL
>it connects well.

  are you telnet'ing from the same host as the browser is running on?
  if not, are the two hosts in the same domain?  if not, maybe the
  target page is refusing to serve certain domains...

---
John Gordon                  "No Silicon Heaven?  Preposterous!  Where would


 
 
 

Response server with telnet not matches with response server to browser

Post by Andrew Giert » Thu, 27 Aug 1998 04:00:00


 Elena> Hi, all!
 Elena>     I'm trying to do an broken link detector in UNIX. Well, my
 Elena> program runs well, but I have a problem.

 Elena>     When it connects to the server which haves the URL
 Elena> specificated, it returns me: "403 Forbidden", but when I, from
 Elena> the browser, check the URL it connects well.

 Elena>     Any suggest?

You're not sending a Host: header in the request.

--
Andrew.

comp.unix.programmer FAQ: see <URL: http://www.erlenstar.demon.co.uk/unix/>
                           or <URL: http://www.whitefang.com/unix/>

 
 
 

1. Slow Telnet response, fast rlogin response

I am running solaris 2.5 on a Sparc20, and I am using DNS for name service.  
When I Telnet to the machine from a remote site, I get very poor response.  It
works for about 1 minute, then hangs for ~1 minute.  If I Telnet to another
machine on our local ethernet, and rlogin to the Solaris 2.5 machine, the
response is fine.  This leads me to believe that it is not a problem with the
connection into my site.  Is there something I need to adjust.

Thanks,
                      Bryan Franz

2. Damaged Routing-Table

3. How to measure response time between web browser and web server ?

4. help: syslog deamon not running

5. Very Slow Response from FTP/TELNET Server

6. how do I make htacces file

7. ftp and telnet server slow response

8. Modelines for 1280x1024 @ 256 colors

9. "YPCAT PASSWD" not receiving a response from the server.

10. Not able to Understand Response Headers from the WMP server

11. arp response, no ping response

12. Slow response on eth1, fast response on eth0

13. Unable to Get Response From Some Web Servers