Learning Networking & Making a Mini Server

I forgot to make a post about this a couple weeks ago. In CSE-297 Web Application, for our first Homework assignment we were asked to build a miniature HTTP Web Server. HTTP stands for Hypertext Transfer Protocol. It is how data is communicated over the world wide web. Before we begin learning languages to build actual web applications, it was important for us to learn and understand HTTP since it dictates how our web applications will interact with web servers. We just learned some basic Networking Principles and Protocols.

So getting back to the Homework assignment, we needed to make a scaled-down HTTP web server and implement two things:

  1. A Content-Type Header
  2. Last-Modified Date

The Content-Type Header is suppose to return/display the type of the resource that is being requested. For example, if the resource being requested is flower.png, then it should have the header:

Content-Type: image/png

And the Last-Modified Header will show the date of the last time a file was modified.

This homework assignment was programmed in Java, and in only about 180 lines of code it was possible to build an HTTP Web Server. Our professor told us we will be able to do the same thing in 5 lines of code later in the semester.

Below is a screenshot of my project running using a test webpage our professor provided to us. There is an excel spreadsheet on the webpage and once clicked, you can see in the right window the HTTP headers I described above.

Image

-Ryan ’15

 

Advertisements

About luryan15

I am a senior Computer Science major at Lehigh University.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s