Exemplo n.º 1
0
 // TODO: HttpRequest is a large struct. We cannot pass it around like that
 protected virtual void WriteResponseFor404(HttpRequest request, TcpConnectionFormatter response) // Not Found
 {
     Log.LogMessage(Log.Level.Warning, "Request {0}, Response: 404 Not Found", request.Path.ToUtf8String(SymbolTable.InvariantUtf8).ToString());
     WriteCommonHeaders(ref response, HttpVersion.V1_1, 404, "Not Found");
     response.AppendEoh();
 }
Exemplo n.º 2
0
 protected abstract void WriteResponse(HttpRequest request, TcpConnectionFormatter response);
Exemplo n.º 3
0
 protected virtual void WriteResponseFor400(Span <byte> requestBytes, TcpConnectionFormatter response) // Bad Request
 {
     Log.LogMessage(Log.Level.Warning, "Request {0}, Response: 400 Bad Request", requestBytes.Length);
     WriteCommonHeaders(ref response, HttpVersion.V1_1, 400, "Bad Request");
     response.AppendEoh();
 }