Exemplo n.º 1
0
        public void OnHeader(ReadOnlySpan <byte> name, ReadOnlySpan <byte> value)
        {
            var nameString  = PrimitiveEncoder.DecodeAscii(name);
            var valueString = PrimitiveEncoder.DecodeAscii(value);

            Headers.Add(nameString, valueString);
        }
Exemplo n.º 2
0
 public void OnStartLine(Http.Method method, Http.Version version, ReadOnlySpan <byte> target, ReadOnlySpan <byte> path, ReadOnlySpan <byte> query, ReadOnlySpan <byte> customMethod, bool pathEncoded)
 {
     Method  = method;
     Version = version;
     Path    = PrimitiveEncoder.DecodeAscii(path);
     Query   = PrimitiveEncoder.DecodeAscii(query);
     Target  = PrimitiveEncoder.DecodeAscii(target);
 }
Exemplo n.º 3
0
 public void OnStartLine(Http.Method method, Http.Version version, ReadOnlySpan <byte> target, ReadOnlySpan <byte> path, ReadOnlySpan <byte> query, ReadOnlySpan <byte> customMethod, bool pathEncoded)
 {
     Method      = method != Http.Method.Custom ? method.ToString().ToUpper() : PrimitiveEncoder.DecodeAscii(customMethod);
     Version     = ToString(version);
     RawTarget   = PrimitiveEncoder.DecodeAscii(target);
     RawPath     = PrimitiveEncoder.DecodeAscii(path);
     Query       = PrimitiveEncoder.DecodeAscii(query);
     PathEncoded = pathEncoded;
 }
Exemplo n.º 4
0
 private Expression InlineIdentityTest(Expression a, Expression b)
 {
     return(PrimitiveEncoder.EncodeReferenceEquals(a, b));
 }
Exemplo n.º 5
0
 public void OnHeader(ReadOnlySpan <byte> name, ReadOnlySpan <byte> value)
 {
     Headers[PrimitiveEncoder.DecodeAscii(name)] = PrimitiveEncoder.DecodeAscii(value);
 }