Clojure/Ring: Using the ring jetty adapter, large requests give me a 413: FULL HEAD error.

后端 未结 1 765
你的背包
你的背包 2021-02-09 16:08

Using Ring\'s Jetty adapter, if my request is too large I get a 413: FULL HEAD error. I tracked it down to a property called headerbuffersize, but when I try to set it in the r

相关标签:
1条回答
  • 2021-02-09 16:28

    I think this should work:

    (def header-buffer-size 1048576)
    
    (def config
      {:host  "example.com"
       :port  8080
       ; join? false ; and any other options...
       :configurator (fn [jetty]
                       (doseq [connector (.getConnectors jetty)]
                         (.setHeaderBufferSize connector
                                               header-buffer-size)))
       })
    
    0 讨论(0)
提交回复
热议问题