Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.5 #127

Merged
merged 1 commit into from
Oct 17, 2024
Merged

0.4.5 #127

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mummy.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.4.4"
version = "0.4.5"
author = "Ryan Oldenburg"
description = "Multithreaded HTTP + WebSocket server"
license = "MIT"
Expand Down
13 changes: 7 additions & 6 deletions src/mummy.nim
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,14 @@ type
event: WebSocketEvent
message: Message

proc `$`*(request: Request): string =
proc `$`*(request: Request): string {.gcsafe.} =
result = request.httpMethod & " " & request.uri & " "
case request.httpVersion:
of Http10:
result &= http10
else:
result &= http11
{.gcsafe.}:
case request.httpVersion:
of Http10:
result &= http10
else:
result &= http11
result &= " (" & $cast[uint](request) & ")"

proc `$`*(websocket: WebSocket): string =
Expand Down
1 change: 1 addition & 0 deletions tests/test_http.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import httpclient, mummy, zippy

proc handler(request: Request) =
echo request
doAssert request.uri == request.path
case request.uri:
of "/":
Expand Down