DecodeUriInPlace() static private method

static private DecodeUriInPlace ( byte uriBytes, int &length ) : void
uriBytes byte
length int
return void
        internal static string DecodeUri(string uri)
        {
            int num;

            byte[] bytes = Encoding.UTF8.GetBytes(uri);
            HttpChannelHelper.DecodeUriInPlace(bytes, out num);
            return(Encoding.UTF8.GetString(bytes, 0, num));
        }
Exemplo n.º 2
0
        } // EscapeInXLinkHref

        internal static String DecodeUri(String uri)
        {
            byte[] uriBytes = Encoding.UTF8.GetBytes(uri);

            int length;

            HttpChannelHelper.DecodeUriInPlace(uriBytes, out length);

            String newUri = Encoding.UTF8.GetString(uriBytes, 0, length);

            return(newUri);
        } // DecodeUri
        private bool ReadFirstLine(out string verb, out string requestURI, out string version)
        {
            int num;

            verb       = null;
            requestURI = null;
            version    = null;
            verb       = base.ReadToChar(' ', s_validateVerbDelegate);
            byte[] uriBytes = base.ReadToByte(0x20);
            HttpChannelHelper.DecodeUriInPlace(uriBytes, out num);
            requestURI = Encoding.UTF8.GetString(uriBytes, 0, num);
            version    = base.ReadToEndOfLine();
            return(true);
        }
Exemplo n.º 4
0
        } // GetResponseStream

        private bool ReadFirstLine(out String verb, out String requestURI, out String version)
        {
            verb       = null;
            requestURI = null;
            version    = null;

            verb = ReadToChar(' ', s_validateVerbDelegate);

            byte[] requestUriBytes = ReadToByte((byte)' ');
            int    decodedUriLength;

            HttpChannelHelper.DecodeUriInPlace(requestUriBytes, out decodedUriLength);
            requestURI = Encoding.UTF8.GetString(requestUriBytes, 0, decodedUriLength);

            version = ReadToEndOfLine();

            return(true);
        } // ReadFirstLine