HTTP GET Index Command :: Winsock
Hi.
I am working on a HTTP client. I want the program to download a specific webpage. The program initializes a connection to the web server and requests index.html.
GET index.html
However, for some reason most web servers I tried have responded with errors about bad requests. I would like to know what is the HTTP command to download a website such as index.html?
Thanks,
Kuphryn
Yes. I that is the command I use.
GET http://www.somethingzyz.com/index.html HTTP/1.1
The server error responses is a bad request.
Kuphryn
GET http://www.somethingzyz.com/index.html HTTP/1.1
The server error responses is a bad request.
Kuphryn
December 16, 2002 11:40 PM
why are you including the entire URL? you''ve already connected to the host/port, so your request should just be for a file, yes?
December 17, 2002 12:05 AM
have you tried it with the "/" before the file name? also, try it w/o the file name if you want the default page.
GET /index.html HTTP 1.1
- or -
GET / HTTP 1.1
GET /index.html HTTP 1.1
- or -
GET / HTTP 1.1
Okay.
GET / HTTP/1.1
That works on some website, buts not all. I will continue debugging. HTTP programming is depends on more on the web server than an absolution solution on the client side.
How do popular web browser including IE and Netscape handle all web server? There are many possible HTTP commands and combinations.
Kuphryn
GET / HTTP/1.1
That works on some website, buts not all. I will continue debugging. HTTP programming is depends on more on the web server than an absolution solution on the client side.
How do popular web browser including IE and Netscape handle all web server? There are many possible HTTP commands and combinations.
Kuphryn
Okay. Thanks.
GET / HTTP/1.1
That works on some website, buts not all. I will continue debugging. HTTP programming is depends on more on the web server than an absolution solution on the client side.
How do popular web browser including IE and Netscape handle all web server? There are many possible HTTP commands and combinations.
Kuphryn
GET / HTTP/1.1
That works on some website, buts not all. I will continue debugging. HTTP programming is depends on more on the web server than an absolution solution on the client side.
How do popular web browser including IE and Netscape handle all web server? There are many possible HTTP commands and combinations.
Kuphryn
Okay. Thanks.
GET / HTTP/1.1
That works on some website, buts not all. I will continue debugging. HTTP programming is depends on more on the web server than an absolution solution on the client side.
How do popular web browser including IE and Netscape handle all web server? There are many possible HTTP commands and combinations.
Kuphryn
GET / HTTP/1.1
That works on some website, buts not all. I will continue debugging. HTTP programming is depends on more on the web server than an absolution solution on the client side.
How do popular web browser including IE and Netscape handle all web server? There are many possible HTTP commands and combinations.
Kuphryn
If you use HTTP version 1.1 you must as a minimum specify the name of the host you''re requesting the data from.
Alternatively you can stick with 1.0:
I can''t be bothered to look it up for you, but you can find all the detailed information you need in rfc2616 (Google for it).
-Neophyte
GET / HTTP/1.1Host: www.hosturl.here.com
Alternatively you can stick with 1.0:
GET / HTTP/1.0
I can''t be bothered to look it up for you, but you can find all the detailed information you need in rfc2616 (Google for it).
-Neophyte
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement