mirror of
https://github.com/opensim/opensim.git
synced 2026-06-06 11:25:46 +08:00
use osutf8 on some http headers parse
This commit is contained in:
@@ -8,6 +8,7 @@ using OSHttpServer.Exceptions;
|
||||
using OSHttpServer.Parser;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OSHttpServer
|
||||
{
|
||||
@@ -165,6 +166,7 @@ namespace OSHttpServer
|
||||
m_currentRequest.AddToBody(e.Buffer, e.Offset, e.Count);
|
||||
}
|
||||
|
||||
private static readonly byte[] OSUTF8expect = osUTF8.GetASCIIBytes("expect");
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -172,7 +174,7 @@ namespace OSHttpServer
|
||||
/// <param name="e"></param>
|
||||
protected virtual void OnHeaderReceived(object sender, HeaderEventArgs e)
|
||||
{
|
||||
if (string.Compare(e.Name, "expect", true) == 0 && e.Value.Contains("100-continue"))
|
||||
if (e.Name.ACSIILowerEquals(OSUTF8expect) && e.Value.Contains("100-continue"))
|
||||
{
|
||||
lock (m_requestsLock)
|
||||
{
|
||||
@@ -180,7 +182,7 @@ namespace OSHttpServer
|
||||
Respond("HTTP/1.1", HttpStatusCode.Continue, null);
|
||||
}
|
||||
}
|
||||
m_currentRequest.AddHeader(e.Name, e.Value);
|
||||
m_currentRequest.AddHeader(e.Name.ToString(), e.Value);
|
||||
}
|
||||
|
||||
private void OnRequestLine(object sender, RequestLineEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user