• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Requesting webpage from webserver

When you open i.e. or any web browser and enter a URL and submit the request to any webserver, "WHAT" is sent?  When I say what, I mean I know that were making a call (request) for maybe a specific webpage as follows:

Open I.E.
Enter: http://www.yahoo.com/ in the URL area
Click enter or submit

I know that the request for the above URL will return the default webpage (index.html or whatever) that the webserver has set up.  But "WHAT" does the webserver receive?  Does the webserver receive a text file that has request information?

0
wesunivofmd
Asked:
wesunivofmd
  • 2
1 Solution
 
humeniukCommented:
It sends a GET request, which is part of the HTTP protocol, not a text file or anything like that.  If you want more detail, this article is a good starting point: 'How Web Servers Work' (http://computer.howstuffworks.com/web-server.htm).  If that's too basic, see http://www.dslab.tuwien.ac.at/Task_Description/http.html or http://www.jmarshall.com/easy/http/.
0
 
Dave_DietzCommented:
It can be very interesting (and useful) to see what exactly is passing back and forth between a client and a web server.

Try downloading the IIS Resource Kit Tools from the following link:
http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en

There is a utility called wfetch in there that will allow you to craft and send requests from basic get requests to complex requests with additional headers and body elements to any given webserver and see exactly what is sent back.

For example, this is what you would see for a standard GET request to http://www.yahoo.com:

started....
resolve hostname "www.yahoo.com"
WWWConnect::Connect("216.109.118.72","80")\n
source port: 4853\r\n
REQUEST: **************\n
GET / HTTP/1.1\r\n
Host: www.yahoo.com\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\n
HTTP/1.1 200 OK\r\n
Date: Mon, 04 Oct 2004 02:38:57 GMT\r\n
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"\r\n
Cache-Control: private\r\n
Vary: User-Agent\r\n
Connection: close\r\n
Transfer-Encoding: chunked\r\n
Content-Type: text/html\r\n
\r\n
<html>
*** Actual page contents deleted for brevity***
></html>\n
\n
<!-- p9.www.dcn.yahoo.com uncompressed/chunked Sun Oct  3 19:38:57 PDT 2004 -->\n
WWWConnect::Close("216.109.118.72","80")\n
closed source port: 4853\r\n
finished.

Kinda cool, huh?  :-)

Hope this helps.....

Dave Dietz
0
 
wesunivofmdAuthor Commented:
Thanks, humeniuk
0
 
humeniukCommented:
Glad to be able to help out a little.  Good luck.

Thanks to Dave, too.  That's a handy tool.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now