Skip to content

Commit

Permalink
Remove debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Jul 22, 2024
1 parent 289cbe3 commit c4750d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/GosuSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override void OnReceivedRequest(HttpRequest request)
if (!path.EndsWith("/ws", StringComparison.Ordinal)
&& !path.EndsWith("/json", StringComparison.Ordinal))
{
Logging.Log("Received FILE? request " + request.Url);
//Logging.Log("Received FILE? request " + request.Url);

HttpResponse response = new HttpResponse();
response.SetBegin(200);
Expand Down Expand Up @@ -70,7 +70,7 @@ protected override void OnReceivedRequest(HttpRequest request)
// 目标存储的绝对位置
string targetFilePath = storage.GetFullPath(storagePath);

Logging.Log("URLPath is " + urlPath);
//Logging.Log("URLPath is " + urlPath);

// 处理Songs
if (urlPath.StartsWith("Songs", StringComparison.Ordinal))
Expand All @@ -94,6 +94,8 @@ protected override void OnReceivedRequest(HttpRequest request)
if (content.Length == 0)
{
response.SetBegin(404);
//Logging.Log("404 File Length is " + response.BodyLength);

this.SendResponse(response);

return;
Expand All @@ -104,6 +106,8 @@ protected override void OnReceivedRequest(HttpRequest request)
.SetHeader("Access-Control-Allow-Origin", "*");
response.SetBody(content);

//Logging.Log("File Length is " + response.BodyLength);

this.SendResponse(response);
return;
}
Expand All @@ -126,6 +130,8 @@ protected override void OnReceivedRequest(HttpRequest request)
.SetHeader("Access-Control-Allow-Origin", "*");
response.SetBody(File.ReadAllBytes(targetFilePath));

//Logging.Log("File Length is " + response.BodyLength);

this.SendResponse(response);
return;
}
Expand Down Expand Up @@ -163,19 +169,19 @@ protected override void OnReceivedRequest(HttpRequest request)
response.SetBody(htmlCode);
this.SendResponse(response);

Logging.Log("Sending " + response.Body);
//Logging.Log("Sending " + response.Body);
}
else
{
Logging.Log("Received WS OR JSON request " + request.Url);
//Logging.Log("Received WS OR JSON request " + request.Url);

base.OnReceivedRequest(request);
}
}

public override void OnWsConnected(HttpRequest request)
{
Logging.Log($"Chat WebSocket session with Id {Id} connected!");
Logging.Log($"WebSocket session with Id {Id} connected!");
}

public override void OnWsDisconnected()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void SetStorage(Storage statics, Storage caches)

protected override void OnError(SocketError error)
{
Logging.Log($"Chat WebSocket server caught an error with code {error}");
Logging.Log($"WebSocket server caught an error with code {error}");
}

public void AddCustomHandler(string path, string urlPath, FileCache.InsertHandler handler)
Expand Down

0 comments on commit c4750d7

Please sign in to comment.