The page has been designed and written by Ayumi Ozeki ozekia@gmail.com
go to home http://ayumi01.s3-website-us-east-1.amazonaws.com
http spy java web browser
A web browser hides a lot of underlying technical
details as to what really goes on between a client (web browser) and a server
(www host). I wrote a Java “web browser” that shows the whole text communication
between a browser and a web server. The browser I have developed acts similar
to a typical browser where you type in an address, see the document requested
(in plain HTML text), and go back and forth.
Background: telnet to a web
host
If you are familiar with a technique
to telnet to a webhost in getting a document, skip this section and go to http spy java browser in action.
You can telnet to a web host
and retrieve HTML response from the host. Here, I am making a connection to my
home page and specifying the port being 80 (blue line in below screenshot).
Connection has been made:
Now I am sending commands (blue rectangular):
Here, I am trying to “GET” the root document “/”
using “HTTP/1.1” where the host is specified as “ayumi01.s3-website-us-east-1.amazonaws.com”
and telling the connection to be closed once the data is retrieved. After
hitting enter on my keyboard twice, the server returns a whole bunch. Below is
the screenshot after tons of stuff has been sent. Note that the connection has
been closed by the foreign host (web server):
Since quite a lot has been sent back, I scrolled up
to see what really happened after I hit enter twice.
In below screenshot, above the blue line shows right
after a connection with a web server has been made. Between the blue line and
the red line, three lines of commands are shown. Below the red line is the raw output
of the webserver.
It turns out the output between the red line and the
green line is not visible to a web browser end user.
Let’s get the same document via web browser by
entering the same address “ayumi01.s3-website-us-east-1.amazonaws.com”
The result is my default page. Check the source and
you will see:
Compared to the telnet output, a dozen or so lines
are missing from this source view. What http spy java web browser does is to
show the whole thing very similar to the telnet way. Further it is a lot easier
to work with than telnet.
http spy java browser in
action
When it is launched, it looks like this:
The upper window shows the command to be sent to the
web server and lower window is to show the result. Below screenshot is to
replicate what has been done via telnet:
As you can see the lower window shows the raw data –
“View source” plus additional header texts, which are not readily available in
a browser. You can go back and forth just like a typical web browser. Note that
upper right of http spy window says “Total 51039 bytes read,” which is more
than “Content-Length: 50684.” The discrepancy is that 50684 represents the HTML
portion that is visible from the “view source” option from the web browser,
while 51039 includes those invisible header section.
HTTP spy for Chrome
I created this application in 2000, such a long time
ago. I just found that “HTTP Spy” extension was available for Chrome browser.
Once you install, all you need to do is to click an icon next to the address
bar and you’ll get the information.
While you get essentially the same data, somehow the
information is not shown in the order the web server actually returned the
data. Once you realize this, then my http spy way of doing things could be a
preferred way to really analyze what goes on.
The fact this Chrome extension has the same name as
I have come up with is an interesting coincident.
The
last update: 9/3/2018
The
page has been designed and written by Ayumi
Ozeki ozekia@gmail.com
go
to home http://ayumi01.s3-website-us-east-1.amazonaws.com