DenoDDeno
Powered by
jcayzacJ
Deno•3y ago•
5 replies
jcayzac

std/http/server: URI too long —how to avoid loading those?

Using https://deno.land/std@0.194.0/http/server.ts, is there a way to reject long URIs before they are loaded in memory? I have a middleware that responds with
414 URI Too Long
414 URI Too Long
when the URI length is > 8192, but this only saves me from the cost of parsing that thing —it's still already loaded in memory even if it's 1MB in size.
How can I get the server to close the connection when the URI grows beyond 8k instead?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Deno.serve vs serve (from @std/http/server.ts)
SlavaSSlava / help
6mo ago
How to prevent std/http from gzipping and overriding Etag
rauniorooRraunioroo / help
4y ago
std/http/setCookie doesn't work?
jcayzacJjcayzac / help
3y ago