简单的WebServer细节
来源:互联网 发布:linux安装oracle11gr2 编辑:程序博客网 时间:2024/04/28 19:47
1.请求静态网页
Client Request:
GET / HTTP/1.1Host: 192.168.10.120:8000Connection: keep-aliveCache-Control: max-age=0User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.95 Safari/537.4Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Encoding: gzip,deflate,sdchAccept-Language: zh-CN,zh;q=0.8Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3#########server回应HTTP/1.0 200 OKServer: SimpleHTTP/0.6 Python/2.7.3Date: Mon, 13 May 2013 15:32:29 GMTContent-type: text/html; charset=mbcsContent-Length: 366<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><title>Directory listing for /</title><body><h2>Directory listing for /</h2><hr><ul><li><a href="1.ps">1.ps</a><li><a href="2.wps">2.wps</a><li><a href="23_lan/">23_lan/</a><li><a href="3.txt">3.txt</a><li><a href="cvtest/">cvtest/</a><li><a href="test1/">test1/</a></ul><hr></body></html>
2.请求传输文件
GET /3.txt HTTP/1.1Host: 192.168.10.120:8000Connection: keep-aliveUser-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.95 Safari/537.4Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Referer: http://192.168.10.120:8000/Accept-Encoding: gzip,deflate,sdchAccept-Language: zh-CN,zh;q=0.8Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3HTTP/1.0 200 OKServer: SimpleHTTP/0.6 Python/2.7.3Date: Mon, 13 May 2013 15:32:34 GMTContent-type: text/plainContent-Length: 516Last-Modified: Mon, 13 May 2013 15:31:54 GMT(1).................................................................................................(2)....................................................j.........................j............................................................................................................................ ..............................................................................................................................................................................................................[2]
3.传输404
GET /favicon.ico HTTP/1.1Host: 192.168.10.120:8000Connection: keep-aliveAccept: */*User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.95 Safari/537.4Accept-Encoding: gzip,deflate,sdchAccept-Language: zh-CN,zh;q=0.8Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3HTTP/1.0 404 File not foundServer: SimpleHTTP/0.6 Python/2.7.3Date: Mon, 13 May 2013 15:32:32 GMTContent-Type: text/htmlConnection: close<head><title>Error response</title></head><body><h1>Error response</h1><p>Error code 404.<p>Message: File not found.<p>Error code explanation: 404 = Nothing matches the given URI.</body>
- 简单的WebServer细节
- 一个简单的webserver
- WebServer的简单实现
- webserver的简单login系统
- 写一个简单的webserver
- 用java编写简单Webserver,理解webserver的功能。
- 用java编写简单Webserver,理解webserver的功能。
- python中一个简单的webserver
- 自己动手写最简单的webserver
- 一个简单的Snappy Ubuntu python webserver
- 一步步实现WebServer中间件——从一个最简单的WebServer开始
- 一些简单的细节
- 一个简单的eclipse + axis1.4 开发webserver
- 实现简单的spring 管理WebServer功能(CXF版)
- 如何写一个简单的webserver(一):最简实现
- Java项目——简单的WebServer(一)
- Java项目——简单的WebServer(二)
- python + django搭建简单webserver
- 应用篇1.3 后台登陆界面设计
- 第十届浙江省程序设计竞赛 && 南京全国邀请赛总结
- Broadcom fullmac WLAN 驱动解析(2)
- 选择排序
- dx编程中链接时提示错误不能解析的外部符号……
- 简单的WebServer细节
- vc6.0项目中使用zlib库和libPng库的直接进行源码级别的编译
- Liferay Portal开发(一)开篇介绍
- hdu 1856 more is better 并查集
- 折半排序
- 黑马程序员——多线程问题
- python 在 win cmd 环境中形如 '\xhh' 输出的转化
- 创建 Web 浏览器样式的 MFC 应用程序简介
- Liferay Portal开发(二)安装配置开发环境