我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

MaxHeaderBytes真的有效吗?

srv := &http.Server{
    Addr:           "127.0.0.1:8080",
    Handler:        r,
    MaxHeaderBytes: 1,
}
srv.ListenAndServe()

I made several requests by curl with custom headers, and app serving it, without any errors. What I am doing wrong?

Yes, it does, but they add a bit of padding to whatever you specify. In the code they add 4096 bytes to the limit for some reason.

近期文章

  • git2go Patch()仅对第一个文件返回diff
  • 如何使用Go模板通过FuncMap解析html文件
  • 转化为可比数据
  • 如何使用接口允许一种以上的结构类型使代码更可用?
  • 在Gorilla Handler中进入日志线程ID
  • 无需外部依赖的高性能网络蜘蛛
  • Golang并发SQL事务
  • 允许golang通过Windows防火墙进行测试
  • 并发os / exec.Command.Wait()时发生内存泄漏
  • Golang:如何使用gomock模拟…interface {}辩论者
  • Golang模板上传文件如何验证文件为空
  • 如何使用无法在结构中捕获为动态JSON的动态密钥解组jSON:GOlang [重复]
  • 将每个值动态附加到GOLANG中的2D切片中
  • json.Marshal映射到JSON数组
  • 如何逃脱网址托管?
  • 怎么在switch中调用类的成员函数
  • stm8 的tim2 ch3通道 PA口,进行捕捉,无法进入中断?求解答?
  • 有没有完整的Python语言的Tensorflow库的神经网络应用的教程
  • 新手vb 6.0+sql 2012做登录界面 实时错误'3704:对象关闭时,不允许操作'?,应该怎么调试
  • 为什么又是段错误呢?(我太菜了)

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华