HttpServer icon indicating copy to clipboard operation
HttpServer copied to clipboard

一个使用C#编写的简易Web服务器

Results 13 HttpServer issues
Sort by recently updated
recently updated
newest added

自己改了一下午,还是没有解决,求助

服务器会抛下面这个异常 `Unable to write data to the transport connection: 你的主机中的软件中止了一个已建立的连接。` 位置: HttpResponse.cs ![](https://img.waypons.com/imgs/2019/11/9f236e7dd1a138a4.png)

if (int.TryParse(contentLength, out var length) && Body.Length != length) { do { length = stream.Read(bytes, 0, MAX_SIZE - 1); Body += Encoding.UTF8.GetString(bytes, 0, length); } while (Body.Length != length); }...

两段代码的事,加上吧 foreach (KeyValuePair kv in Headers) builder.AppendLine(kv.Key+":"+kv.Value);

如果是视频文件mp4,播放的时候不能在点击进度条,到指定位置播放?也没法往前拖动

``` private string GetRequestData(Stream stream) { var length = 0; var data = string.Empty; do { length = stream.Read(bytes, 0, MAX_SIZE - 1); data += Encoding.UTF8.GetString(bytes, 0, length); } while...

private string GetRequestData(Stream stream) { var length = 0; var data = string.Empty; do { length = stream.Read(bytes, 0, MAX_SIZE - 1); data += Encoding.UTF8.GetString(bytes, 0, length); } while (length...

get请求不到是什么原因?post请求得不到数据?