gleam HTTP server. because it glistens on a web
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

wrong gleam version for formatting

+9 -18
+2 -5
src/mist/internal/http.gleam
··· 223 223 } 224 224 } 225 225 } 226 - <<>> as data, _ 227 - | data, Error(Nil) -> { 226 + <<>> as data, _ | data, Error(Nil) -> { 228 227 use next <- result.then(read_data( 229 228 socket, 230 229 transport, ··· 384 383 data: data, 385 384 remaining: remaining, 386 385 attempts: attempts, 387 - ) 388 - if remaining > 0 389 - -> { 386 + ) if remaining > 0 -> { 390 387 let res = 391 388 selector 392 389 |> process.select(1000)
+1 -3
src/mist/internal/http/handler.gleam
··· 65 65 req: Request(Connection), 66 66 ) -> process.ExitReason { 67 67 case error { 68 - Exited(msg) 69 - | Thrown(msg) 70 - | Errored(msg) -> { 68 + Exited(msg) | Thrown(msg) | Errored(msg) -> { 71 69 logging.log(logging.Error, string.inspect(error)) 72 70 let _ = 73 71 response.new(500)
+6 -10
src/mist/internal/http2.gleam
··· 138 138 0 -> send_headers(context, conn, headers, True, id) 139 139 _ -> { 140 140 send_headers(context, conn, headers, False, id) 141 - |> result.then( 142 - fn( 143 - context, 144 - // TODO: this should be broken up by window size 145 - // TODO: fix end_stream 146 - ) { 147 - send_data(conn, bytes_builder.to_bit_array(resp.body), id, True) 148 - |> result.replace(context) 149 - }, 150 - ) 141 + |> result.then(fn(context) { 142 + // TODO: this should be broken up by window size 143 + // TODO: fix end_stream 144 + send_data(conn, bytes_builder.to_bit_array(resp.body), id, True) 145 + |> result.replace(context) 146 + }) 151 147 } 152 148 } 153 149 }