Commit Graph

27 Commits

Author SHA1 Message Date
Aliaksandr Valialkin a81d93c2ae Added ability to limit keep-alive connection lifetime 2015-11-23 14:17:49 +02:00
Aliaksandr Valialkin a8bfab03d8 API prettifying: ServeConnTime -> ConnTime, ServeConnRequestNum -> ConnRequestNum 2015-11-22 01:29:42 +02:00
Aliaksandr Valialkin 954a0615dc Fixed a typo in RequestCtx.SetConnectionClose() 2015-11-19 11:51:04 +02:00
Aliaksandr Valialkin a2601c68af API consistency change - make Response.StatusCode accessor 2015-11-19 11:39:20 +02:00
Aliaksandr Valialkin 86fe38c7a2 Hide Respone and Request body behind Body accessors 2015-11-18 14:00:24 +02:00
Aliaksandr Valialkin f3b4ff17b1 Added accessors for determining ServeConn call start time and the sequence number of request served in the connection 2015-11-17 16:29:14 +02:00
Aliaksandr Valialkin 2dbf142a06 convert connectionClose to accessor 2015-11-16 18:23:08 +02:00
Aliaksandr Valialkin c728643d4a Access Content-Length via ContentLength accessor 2015-11-16 18:09:05 +02:00
Aliaksandr Valialkin f1f78f0828 Hide Request.URI and Request.PostArgs behind accessors, which automatically call parse URI and PostArgs on first access 2015-11-15 23:47:22 +02:00
Aliaksandr Valialkin 88e41d9b08 Removed accessors converting []byte to string, i.e. allocating memory. This should reduce memory usage for apps using fasthttp, since now they shoud either use []byte or do string() conversion on their own :) 2015-11-14 18:25:00 +02:00
Aliaksandr Valialkin 2e78d83bf7 Hide Request.RequestURI behind accessors in order to prevent users shooting in the foot when assigning to Request.RequestURI directly 2015-11-14 17:58:58 +02:00
Aliaksandr Valialkin 1f81c87c38 Substituted direct access to Request.Method by accessors, so package users don't shoot in the foot when assigning directly to Request.Method 2015-11-14 17:34:12 +02:00
Aliaksandr Valialkin 3f0794bcd1 Added RequestCtx.LocalAddr() for determining server address for the current connection 2015-11-12 21:50:44 +02:00
Aliaksandr Valialkin 69758b81d6 Accept net.Conn instead of io.ReadWriteCloser in Serve*() methods, since in reality we use net.Conn methods such as RemoteAddr, SetReadDeadline and SetWriteDeadline 2015-11-11 16:17:12 +02:00
Aliaksandr Valialkin a0ee798bbe Added RequestCtx.Init() helper for custom Server implementations 2015-11-09 18:41:27 +02:00
Aliaksandr Valialkin 3aa2987131 Substituted RequestCtx.shadow with more clear timeoutErrMsg 2015-11-09 11:03:50 +02:00
Aliaksandr Valialkin 5a6e973ab3 Log request duration in RequextCtx.Logger() 2015-11-06 16:21:49 +02:00
Aliaksandr Valialkin a7fdc68be0 Enforce MaxConnsPerIP limit to connections served via Server.ServeConn() 2015-11-05 10:56:04 +02:00
Aliaksandr Valialkin 27862cc299 Fixed data races in Request.ReadTimeout() and Response.ReadTimeout(). Documented that the request and response instances cannot be used after ErrReadTimeout error 2015-10-26 14:13:33 +02:00
Aliaksandr Valialkin 40e775dce5 Added TimeoutHandler 2015-10-23 14:56:01 +03:00
Aliaksandr Valialkin 9a1e1f2e61 Renamed ServerCtx to more appropriate RequestCtx 2015-10-22 11:46:33 +03:00
Aliaksandr Valialkin d0deaebb43 Added request start time to ServerCtx 2015-10-21 16:09:35 +03:00
Aliaksandr Valialkin 45d00cad56 Fixed broken test 2015-10-21 16:06:15 +03:00
Aliaksandr Valialkin 37cb5a0c67 Added status codes from net/http 2015-10-21 16:02:53 +03:00
Aliaksandr Valialkin d49d752a65 Substituted racy ServerCtx.Steal() with ServerCtx.TimeoutError() 2015-10-21 15:05:44 +03:00
Aliaksandr Valialkin ee62382f34 Uniformly process all headers 2015-10-20 12:36:33 +03:00
Aliaksandr Valialkin a049630bca initial commit 2015-10-19 01:21:09 +03:00