Skip to content

Commit

Permalink
Fix date on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trikko committed May 24, 2024
1 parent 427a1e5 commit 56a1132
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/serverino/interfaces.d
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,9 @@ struct Output
bool has_content_type = false;

_headersBuffer.append(_httpVersion ~ " " ~ _status.to!string ~ " " ~ statusDescription ~ "\r\n");
_headersBuffer.append("date: " ~ Output.toHTTPDate(Clock.currTime) ~ "\r\n");

version(DISABLE_DATE_HEADER) { }
else _headersBuffer.append("date: " ~ Output.toHTTPDate(Clock.currTime) ~ "\r\n");

// These headers are ignored if we are sending a websocket response
if (!_websocket)
Expand Down
1 change: 1 addition & 0 deletions tests/test-01/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ authors "Andrea Fontana"
copyright "Copyright © 2023-2024, Andrea Fontana"
license "MIT"
dependency "serverino" path="../../"
versions "DISABLE_DATE_HEADER"
1 change: 1 addition & 0 deletions tests/test-02/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ authors "Andrea Fontana"
copyright "Copyright © 2023-2024, Andrea Fontana"
license "MIT"
dependency "serverino" path="../../"
versions "DISABLE_DATE_HEADER"

0 comments on commit 56a1132

Please sign in to comment.