Skip to content

Commit

Permalink
adjust maxRequestHeaderLineSize to size_t; fixup non-tab indention
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesreiss authored and s-ludwig committed Nov 27, 2023
1 parent 03d5c39 commit 50b5163
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions http/vibe/http/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ HTTPServerRequest createTestHTTPServerRequest(URL url, HTTPMethod method, InetHe
@safe {
auto tls = url.schema == "https";
auto ret = new HTTPServerRequest(Clock.currTime(UTC()), url.port ? url.port : tls ? 443 : 80);
ret.m_settings = new HTTPServerSettings;
ret.m_settings = new HTTPServerSettings;
ret.requestPath = url.path;
ret.queryString = url.queryString;
ret.username = url.username;
Expand Down Expand Up @@ -658,8 +658,8 @@ final class HTTPServerSettings {
/// the url and all headers.
ulong maxRequestHeaderSize = 8192;

/// Maximum number of bytes in a single line in the request header.
ulong maxRequestHeaderLineSize = 4096;
/// Maximum number of bytes in a single line in the request header.
size_t maxRequestHeaderLineSize = 4096;

/// Sets a custom handler for displaying error pages for HTTP errors
@property HTTPServerErrorPageHandler errorPageHandler() @safe { return errorPageHandler_; }
Expand Down Expand Up @@ -2375,7 +2375,7 @@ private bool handleRequest(InterfaceProxy!Stream http_stream, TCPConnection tcp_
}


private void parseRequestHeader(InputStream)(HTTPServerRequest req, InputStream http_stream, IAllocator alloc, ulong max_header_size, ulong max_header_line_size)
private void parseRequestHeader(InputStream)(HTTPServerRequest req, InputStream http_stream, IAllocator alloc, ulong max_header_size, size_t max_header_line_size)
if (isInputStream!InputStream)
{
auto stream = FreeListRef!LimitedHTTPInputStream(http_stream, max_header_size);
Expand Down

0 comments on commit 50b5163

Please sign in to comment.