public FastcgiRequest(FastcgiHandler FastcgiHandler, ushort RequestId) { this.FastcgiHandler = FastcgiHandler; this.RequestId = RequestId; this.ParamsStream = new FascgiRequestInputStream(); this.StdinStream = new FascgiRequestInputStream(); this.StdoutStream = new FascgiResponseOutputStream(this, Fastcgi.PacketType.FCGI_STDOUT); this.StderrStream = new FascgiResponseOutputStream(this, Fastcgi.PacketType.FCGI_STDERR); }
public void ParseParamsStream() { Params = new Dictionary <string, string>(); ParamsStream.Position = 0; while (!ParamsStream.Eof()) { var Key = new byte[FastcgiPacketReader.ReadVariableInt(ParamsStream)]; var Value = new byte[FastcgiPacketReader.ReadVariableInt(ParamsStream)]; ParamsStream.Read(Key, 0, Key.Length); ParamsStream.Read(Value, 0, Value.Length); Params[Encoding.ASCII.GetString(Key)] = Encoding.ASCII.GetString(Value); } ParamsStream = new FascgiRequestInputStream(); }
public void ParseParamsStream() { Params = new Dictionary<string, string>(); ParamsStream.Position = 0; while (!ParamsStream.Eof()) { var Key = new byte[FastcgiPacketReader.ReadVariableInt(ParamsStream)]; var Value = new byte[FastcgiPacketReader.ReadVariableInt(ParamsStream)]; ParamsStream.Read(Key, 0, Key.Length); ParamsStream.Read(Value, 0, Value.Length); Params[Encoding.ASCII.GetString(Key)] = Encoding.ASCII.GetString(Value); } ParamsStream = new FascgiRequestInputStream(); }