Aliaksandr Valialkin
5c8ab236b8
typo fix
2015-12-08 10:45:16 +02:00
Aliaksandr Valialkin
3072afc5e7
Returned back io.LimitedReader wrapper for writing response body streams
2015-12-08 10:44:20 +02:00
Aliaksandr Valialkin
c1f7d2b1f0
Properly close response body stream
2015-12-08 10:27:37 +02:00
Aliaksandr Valialkin
778f4a1054
An attempt to trigger sendfile path in FSHandler when sending big files
2015-12-07 12:06:39 +02:00
Aliaksandr Valialkin
ad0de104c0
Use New() function in copyBufPool
2015-12-07 09:33:08 +02:00
Aliaksandr Valialkin
9441c5f5e3
Do not wrap reader into io.LimitedReader in writeBodyFixedSize - if the reader will return more than the expected bytes, then the error will be returned. This allows io.CopyBuffer() exploiting io.WriterTo interface on the reader, which may result in improved speed for optimized readers
2015-12-07 09:10:48 +02:00
Aliaksandr Valialkin
a7e597579f
Revert "FSHandler optimization: added WriteTo to fsFileReader. This should speed up io.Copy() from fsFileReader"
...
This reverts commit 0979f22779 .
2015-12-06 20:46:20 +02:00
Aliaksandr Valialkin
0e8987247d
Revert "Properly implement fsFileReader.WriteTo for file handlers"
...
This reverts commit 66029e50a6 .
2015-12-06 20:46:18 +02:00
Aliaksandr Valialkin
66029e50a6
Properly implement fsFileReader.WriteTo for file handlers
2015-12-06 20:42:43 +02:00
Aliaksandr Valialkin
0979f22779
FSHandler optimization: added WriteTo to fsFileReader. This should speed up io.Copy() from fsFileReader
2015-12-06 20:20:46 +02:00
Aliaksandr Valialkin
4ac44f0c6c
Mention which structs are safe for use from concurrently running goroutines (Server, Client and HostClient) and which structs are unsafe to use from concurrently running goroutines - all the other
2015-12-03 13:38:59 +02:00
Aliaksandr Valialkin
fe212fe380
Issue #6 : Add support for PATCH method and other methods which may contain body
2015-12-02 20:17:50 +02:00
Aliaksandr Valialkin
534693af18
Clear response body when setting body stream
2015-12-02 12:15:49 +02:00
Aliaksandr Valialkin
158fcfbb7f
Reset bodyStream when SetBody or ResetBody is called
2015-12-02 08:40:50 +02:00
Aliaksandr Valialkin
1ddca5dc04
Added ResetBody
2015-12-02 08:36:31 +02:00
Aliaksandr Valialkin
4cf82252e3
Added ability to filter out non-GET requests
2015-11-29 12:49:01 +02:00
Aliaksandr Valialkin
b5277095ae
Clear Response.SkipBody in Reset
2015-11-29 12:29:29 +02:00
Aliaksandr Valialkin
fb07cbbd31
Signify that Request and Response from RequestCtx and Header from Request and Response mustn't be copied by value
2015-11-29 12:18:33 +02:00
Aliaksandr Valialkin
1e26cafa01
Properly copy Request.uri and Request.postArgs
2015-11-29 12:11:12 +02:00
Aliaksandr Valialkin
6a340b7334
Added request PUT method support
2015-11-29 11:32:44 +02:00
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