Commit Graph

30 Commits

Author SHA1 Message Date
Aliaksandr Valialkin 01031f43e2 Added support form multipart/form-data POST requests 2015-11-27 16:23:02 +02:00
Aliaksandr Valialkin df6fda8c33 Added ability to limit request body size on the server and response body size on the client 2015-11-27 13:22:15 +02:00
Aliaksandr Valialkin aa3b9144de Fixed user-agent string in TestRequestString 2015-11-25 14:30:09 +02:00
Aliaksandr Valialkin c9abc7ac4c Added String method to Request and Response 2015-11-22 16:47:27 +02:00
Aliaksandr Valialkin 46ac549ae1 Access URI members via accessors 2015-11-22 13:05:24 +02:00
Aliaksandr Valialkin 22c2789727 Added WriteTo, AppendBytes and String methods to RequestHeander and ResponseHeader 2015-11-22 02:14:09 +02:00
Aliaksandr Valialkin 2b1eca3a70 Optimize request uri parsing - defer Host header reading 2015-11-19 15:05:27 +02:00
Aliaksandr Valialkin a2601c68af API consistency change - make Response.StatusCode accessor 2015-11-19 11:39:20 +02:00
Aliaksandr Valialkin 835bf87605 API consistency: Clear -> Reset to be consistent with standard go packages 2015-11-18 17:55:28 +02:00
Aliaksandr Valialkin 72347ec910 Added BodyWrite() to Request and Response for writing request and response bodies 2015-11-18 14:17:42 +02:00
Aliaksandr Valialkin 86fe38c7a2 Hide Respone and Request body behind Body accessors 2015-11-18 14:00:24 +02:00
Aliaksandr Valialkin 6d16259215 Added SetBody and SetBodyStream methods to Response and RequestCtx 2015-11-18 13:49:23 +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 f1e8e6bf25 Added support for identity responses. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 for details 2015-11-13 13:33:32 +02:00
Aliaksandr Valialkin 51135320b2 Update ContentLength in header after request/response body has been read 2015-11-13 11:53:44 +02:00
Aliaksandr Valialkin 86115595ab Allow setting body length for Response.BodyStream via ResponseHeader.ContentLength 2015-11-12 13:30:27 +02:00
Aliaksandr Valialkin 5460e53c17 Subsitute empty RequestURI with slash 2015-11-11 19:15:54 +02:00
Aliaksandr Valialkin 2ae796311b Cleanup: removed dubious and hard-to-use-properly ReadTimeout from Request and Response. Use SetReadDeadline on the underlying conn instead 2015-11-11 16:52:32 +02:00
Aliaksandr Valialkin 429d60e13a ErrReadTimeout -> ErrTimeout 2015-11-11 16:44:53 +02:00
Aliaksandr Valialkin 02d312eb54 Added BodyStream to Response, so RequestHandler may set BodyStream instead of Body when it needs response body streaming 2015-11-11 12:54:49 +02:00
Aliaksandr Valialkin 4c2a55ed12 Set default user-agent in http request 2015-11-08 21:58:46 +02:00
Aliaksandr Valialkin 77405b69f5 Round body buffer size to powers of 2 2015-10-26 15:40:30 +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 9fc3f767e6 Added timeout covering full request read 2015-10-22 14:32:20 +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