| 12345678910111213141516171819202122 |
- package splithttp_test
- import (
- "testing"
- "github.com/xtls/xray-core/common"
- . "github.com/xtls/xray-core/transport/internet/splithttp"
- )
- func Test_regression_readzero(t *testing.T) {
- q := NewUploadQueue(10)
- q.Push(Packet{
- Payload: []byte("x"),
- Seq: 0,
- })
- buf := make([]byte, 20)
- n, err := q.Read(buf)
- common.Must(err)
- if n != 1 {
- t.Error("n=", n)
- }
- }
|