Telnet Request Solution – Web Development


Status code is 302, and the location header was this URL. Iana.org/domain/example. Okay, I’ll work through how I find the answers and hopefully you did something similar. So we go to our terminal and we said example.com. So let’s make that request, telnet to www.example.com. Port 80. Okay. Now we say GET / HTTP/1.0. HOST, www.example.com. Uh-huh. Nice simple response. We can see our status code is 302. And we can see our location header is right here, iana.org. If that didn’t work, you know, here’s how you do it. All right, so let’s let’s play around a little bit more. So we see that this is a redirect sponse, response because of status code 302 and it’s saying the actual content is here. Let’s give a shot at making the request to find this. We’re going telnet to iana.org and make a request for this path and see how it goes. See if we can get a 200. We make the request to iana.org. Telnet to www.iana.org port 80 and then we say get slash. Domain slash example http slash 1.0. Okay so here we are. You can see where I telnetted into Iana.org and you can see the request I made for slash domain slash example. I used http 1.0 again. And you can see the response. [LAUGH] This is actually kind of funny. So we respond it with HTTP/1.1 status 200. This is actually a good example of, you know, the web not aligning up exactly correctly but that’s how it goes. Generally, this 1.1 should have mashed this 1.0 but since these guys control the web, I guess they can do whatever they like. Okay, so you can see the common headers, dates You know, today [LAUGH] actually today for me and the past for you. You can see the server header, Apache and you see it. This is an interesting how they’re last modified. This page was last modified over a year ago. This is for caching purposes. This tells our browser that we don’t need to bother requesting this page again, you know? We don’t need new updates if it hasn’t changed since this date. Content type. This is typical. Text HTML. And, below that, you see the content. Pretty cool huh?

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *