Skip to content

Commit

Permalink
feat(gemini): support netcat-style single newline client message
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuwn committed Jun 23, 2024
1 parent bae78f0 commit 91cc21d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gemini.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn get_gemtext_from_capsule(message) {
let assert Ok(request) = case bit_array.to_string(message) {
Ok(path) -> {
case path {
"/\r\n" | "\r\n" -> request.to(gemini_proxy <> root_capsule)
"/\r\n" | "\r\n" | "\n" -> request.to(gemini_proxy <> root_capsule)
"/proxy/" <> route ->
request.to(gemini_proxy <> string.replace(route, "\r\n", ""))
"/" <> path ->
Expand Down

0 comments on commit 91cc21d

Please sign in to comment.