![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
http
文章平均质量分 62
zhm_icbchz
要相信这世上,有的人比你天才,还比你努力
展开
-
tinyhttpd代码学习
Tinyhttpd tinyhttpd是一个超轻量型Http Server,使用C语言开发,全部代码只有502行(包括注释),附带一个简单的Client,可以通过阅读这段代码理解一个 Http Server 的本质/* J. David's webserver *//* This is a simple webserver. * Created November 1999 by J. Dav原创 2016-07-12 01:02:32 · 709 阅读 · 0 评论 -
http协议多线程下载,支持断点续传(后续再完善)
#include <iostream>#include <iosfwd>#include <fstream>#include <regex>#include <string>#include <winsock2.h>#include <pthread.h>#include <stdio.h>#include <map>#include <queue>/***要实现多线程http协原创 2016-07-28 00:09:54 · 1869 阅读 · 1 评论 -
http协议之chunk(分块传输编码)
HTTP协议之chunk编码(分块传输编码)分块传输编码(Chunked transfer encoding)是超文本传输协议(HTTP)中的一种数据传输机制,允许HTTP由应用服务器发送给客户端应用( 通常是网页浏览器)的数据可以分成多个部分。分块传输编码只在HTTP协议1.1版本(HTTP/1.1)中提供。通常,HTTP应答消息中发送的数据是整个发送的,Content-Length消息头字段表示转载 2016-07-18 18:40:16 · 3299 阅读 · 0 评论 -
准备写一个http下载,支持断点下载,多线程下载
实现这个功能,需要使用http中分块下载,先写个小程序试试http中使用Range:bytes功能#include <iostream>#include <iosfwd>#include <fstream>#include <regex>#include <string>#include <winsock2.h>#include <pthread.h>#include <map>#原创 2016-07-20 16:04:50 · 559 阅读 · 0 评论 -
nginx模块简单开发(发送字符串方式)
直接定义一个字符串,用返回字符串的返回到客户端/* zhuheming 20160811*/#include <ngx_config.h>#include <ngx_core.h>#include <ngx_http.h>//定义字符串static char ngx_http_echo_page[] ="<html>" CRLF"<head><title>Welcome to n原创 2016-08-20 18:32:19 · 1086 阅读 · 0 评论 -
nginx的http模块开发(直接发送html文件方式)
自己写的一个简单返回html文件的模块,但是返回不成功,需要学习一下filter模块的工作细节才能知道原因。 不多说,放代码 ngx_http_echo_module.c/* zhuheming 20160811*/#include <ngx_config.h>#include <ngx_core.h>#include <ngx_http.h>static ngx_int_tn原创 2016-08-19 12:22:29 · 2632 阅读 · 0 评论 -
Server.xml配置
Server.xml配置文件用于对整个容器进行相关的配置。 Server元素:是整个配置文件的根元素。表示整个Catalina容器。 属性:className:实现了org.apache.catalina.Server接口的类名,标准实现类是org.apache.catalina.core.StandardServer类。Port:Tomcat服务器监听用于关闭Tomcat服务器的命令(必须)S转载 2016-10-27 21:35:32 · 548 阅读 · 0 评论