Ejemplo n.º 1
0
 private bool ParseRawHeaderValues(
     HeaderDescriptor descriptor,
     HttpHeaders.HeaderStoreItemInfo info,
     bool removeEmptyHeader)
 {
     lock (info)
     {
         if (info.RawValue != null)
         {
             if (!(info.RawValue is List <string> rawValue))
             {
                 HttpHeaders.ParseSingleRawHeaderValue(descriptor, info);
             }
             else
             {
                 HttpHeaders.ParseMultipleRawHeaderValues(descriptor, info, rawValue);
             }
             info.RawValue = (object)null;
             if (info.InvalidValue == null)
             {
                 if (info.ParsedValue == null)
                 {
                     if (removeEmptyHeader)
                     {
                         this._headerStore.Remove(descriptor);
                     }
                     return(false);
                 }
             }
         }
     }
     return(true);
 }