Ejemplo n.º 1
0
        private unsafe void AppendUnknownHeaders(ReadOnlySpan <byte> name, string valueString)
        {
            string key = name.GetHeaderName();

            Unknown.TryGetValue(key, out var existing);
            Unknown[key] = AppendValue(existing, valueString);
        }
Ejemplo n.º 2
0
        private unsafe void AppendUnknownHeaders(byte *pKeyBytes, int keyLength, string value)
        {
            string key = new string('\0', keyLength);

            fixed(char *keyBuffer = key)
            {
                if (!StringUtilities.TryGetAsciiString(pKeyBytes, keyBuffer, keyLength))
                {
                    BadHttpRequestException.Throw(RequestRejectionReason.InvalidCharactersInHeaderName);
                }
            }

            Unknown.TryGetValue(key, out var existing);
            Unknown[key] = AppendValue(existing, value);
        }
Ejemplo n.º 3
0
 private unsafe void AppendUnknownHeaders(string name, string valueString)
 {
     name = GetInternedHeaderName(name);
     Unknown.TryGetValue(name, out var existing);
     Unknown[name] = AppendValue(existing, valueString);
 }