Aliaksandr Valialkin
d7ecf59c5d
Added Request.RemoveMultipartFormFiles for removing temporary files created during reading multipart/form-data request
2015-11-28 10:32:55 +02:00
Aliaksandr Valialkin
cc79b27b51
Imporoved multipart/form-data support.
...
* The server automatically deletes temporary uploaded files after returning
from RequestHandler.
* Multipart data is automatically streamed into temporary files on request
reading. This limits memory usage for big file uploads.
2015-11-28 10:18:03 +02:00
Aliaksandr Valialkin
02a86866ef
Increased maximum in-memory file size from 1MB to 16MB
2015-11-27 16:24:52 +02:00
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
295e2bcd15
Return error message instead of http request/response representation on error in Request.String and Response.String
2015-11-23 12:23:44 +02:00
Aliaksandr Valialkin
c9abc7ac4c
Added String method to Request and Response
2015-11-22 16:47:27 +02:00
Aliaksandr Valialkin
a862d8592a
Documentation update
2015-11-22 06:33:58 +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
3db5dc0ef2
Do not allocate memory on BodyWriter() call
2015-11-19 18:48:21 +02:00
Aliaksandr Valialkin
2b1eca3a70
Optimize request uri parsing - defer Host header reading
2015-11-19 15:05:27 +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
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
3ee3da595e
Added Response.SetStatusCode
2015-11-18 13:51:04 +02:00
Aliaksandr Valialkin
6d16259215
Added SetBody and SetBodyStream methods to Response and RequestCtx
2015-11-18 13:49:23 +02:00
Aliaksandr Valialkin
42fc4078fb
Formatting fix
2015-11-17 20:00:26 +02:00
Aliaksandr Valialkin
8ad281a331
Added StatusCode accessor to Response
2015-11-16 19:26:32 +02:00
Aliaksandr Valialkin
c728643d4a
Access Content-Length via ContentLength accessor
2015-11-16 18:09:05 +02:00
Aliaksandr Valialkin
4797d4386d
access host header via Host accessor
2015-11-16 16:32:33 +02:00
Aliaksandr Valialkin
f86ba6d4ea
Access requestURI via RequestURI accessor
2015-11-16 16:25:09 +02:00
Aliaksandr Valialkin
e264d1a4f8
Acccess Content-Type via ContentType() accessor
2015-11-16 16:06:28 +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
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
6edf440c99
Added SetRequestURI* helpers to Request
2015-11-13 19:33:28 +02:00
Aliaksandr Valialkin
b6c8cea99b
Mention that client never sets BodyStream on response
2015-11-13 17:58:08 +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
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
da671de3ad
Fixed a typo
2015-11-10 17:42:35 +02:00
Aliaksandr Valialkin
0f67cb2ee4
Added CopyTo() to Request and Response
2015-11-09 16:46:41 +02:00
Aliaksandr Valialkin
6b598d3645
moved common code to clearSkipHeader()
2015-11-02 18:27:56 +02:00
Aliaksandr Valialkin
5642921b17
Small fix in docs
2015-10-26 17:52:28 +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
e9d6d7f561
Document Request, Response, RequestHeader, ResponseHeader, URI and Args
2015-10-23 15:56:12 +03:00
Aliaksandr Valialkin
40e775dce5
Added TimeoutHandler
2015-10-23 14:56:01 +03:00
Aliaksandr Valialkin
ff291a0679
release timer on request/response read timeout
2015-10-22 15:48:06 +03:00
Aliaksandr Valialkin
9fc3f767e6
Added timeout covering full request read
2015-10-22 14:32:20 +03:00
Aliaksandr Valialkin
d33ef331de
Access host and contentType directly in Request.ParseURI() and Request.ParsePostArgs()
2015-10-22 11:44:04 +03:00
Aliaksandr Valialkin
37cb5a0c67
Added status codes from net/http
2015-10-21 16:02:53 +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