Skip to content
This repository was archived by the owner on Sep 29, 2022. It is now read-only.
This repository was archived by the owner on Sep 29, 2022. It is now read-only.

解析Http协议有问题 #15

@ruijiexie

Description

@ruijiexie

HttpRequest.cs里
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 > 0 && !data.Contains("\r\n\r\n"));

        return data;
    }

这个解析HTTP协议自己想想的,HTTP头和BODY不同时发送都处理不了。。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions