mirror of
https://github.com/mm201/GamestatsBase.git
synced 2026-09-07 10:06:08 -05:00
Obtain the request path in a way that doesn't depend on my URL rewrite scheme.
This commit is contained in:
@@ -71,10 +71,15 @@ namespace GamestatsBase
|
||||
return;
|
||||
}
|
||||
|
||||
String rawPath = context.Request.RawUrl;
|
||||
int qmPos = rawPath.IndexOf('?');
|
||||
if (qmPos >= 0)
|
||||
rawPath = rawPath.Substring(0, qmPos);
|
||||
|
||||
if (context.Request.QueryString.Count == 1)
|
||||
{
|
||||
// this is a new session request
|
||||
GamestatsSession session = CreateSession(pid, context.Request.PathInfo);
|
||||
GamestatsSession session = CreateSession(pid, rawPath);
|
||||
GamestatsSessionManager manager = GamestatsSessionManager.FromContext(context);
|
||||
manager.Add(session);
|
||||
|
||||
@@ -171,7 +176,7 @@ namespace GamestatsBase
|
||||
MemoryStream response = new MemoryStream();
|
||||
try
|
||||
{
|
||||
ProcessGamestatsRequest(dataTrim, response, context.Request.PathInfo, pid, context);
|
||||
ProcessGamestatsRequest(dataTrim, response, rawPath, pid, context);
|
||||
}
|
||||
catch (GamestatsException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user