Commit Graph

566 Commits

Author SHA1 Message Date
Aliaksandr Valialkin 910e5a9d2a Added FormFile and FormValue helpers to RequestCtx in order to be on par with net/http 2016-01-08 15:03:02 +02:00
Aliaksandr Valialkin 86ae7f9eb2 Allow parsing post args for non-POST requests (for instance, for PUT requests) 2016-01-08 14:31:49 +02:00
Aliaksandr Valialkin a175504c5f improved 'connection: close' server tests 2016-01-08 13:52:28 +02:00
Aliaksandr Valialkin 3bd3552062 Added ResetConnectionClose() to RequestHeader and ResponseHeader 2016-01-08 13:43:44 +02:00
Aliaksandr Valialkin 414149027d gofmt 2016-01-08 13:39:51 +02:00
Aliaksandr Valialkin 56a0483095 FS: limit maximum file size, which can be compressed 2016-01-08 12:57:42 +02:00
Aliaksandr Valialkin bbb68f32d1 FS: reduced miminum compression ratio for triggering response compression. This should reduce CPU usage for files with low compression ratio 2016-01-08 12:52:35 +02:00
Aliaksandr Valialkin 8a8dfcb157 It looks like travis forgot about 'tip' golang version. Switching to 1.5.2 2016-01-06 17:22:54 +02:00
Aliaksandr Valialkin 10c0d9fdcf Point to fasthttpadaptor docs instead of source code in README 2016-01-06 17:14:15 +02:00
Aliaksandr Valialkin d53b8f0f3c Added net/http -> fasthttp converter for quick and easy switching to fasthttp 2016-01-06 17:11:43 +02:00
Aliaksandr Valialkin 7d7c17c8d7 Do not send response body (and content-length) for 1xx, 204 and 304 responses 2016-01-06 15:22:52 +02:00
Aliaksandr Valialkin ac22368912 Added ProxyHandler to TODO 2016-01-06 12:34:52 +02:00
Aliaksandr Valialkin c5d9023043 Issue #30: properly handle content-length for HEAD responses 2016-01-05 18:02:50 +02:00
Aliaksandr Valialkin 7f5b710e05 Issue #31: do not send response body for HEAD requests 2016-01-05 16:53:38 +02:00
Aliaksandr Valialkin 84af73053f Added tests for RequestCtx.*UserValue* functions 2016-01-05 15:59:33 +02:00
Aliaksandr Valialkin dbe26b3541 Do not set Content-Length in GET and HEAD requests according to pull request #31 (thanks to @buaazp ) 2016-01-05 15:47:30 +02:00
Aliaksandr Valialkin 2633e1c90d Mention that example fileserver support byte range responses 2016-01-05 15:30:34 +02:00
Aliaksandr Valialkin 2ff945b9ea Properly reset scratch buffer for header values 2016-01-05 14:30:05 +02:00
Aliaksandr Valialkin da62899f14 Removed obsolete startPos verification 2016-01-05 14:22:17 +02:00
Aliaksandr Valialkin fc2dc7b3f1 Added WriteMultipartForm helper 2016-01-05 14:12:23 +02:00
Aliaksandr Valialkin 8a83396595 FS: added support for byte range requests 2016-01-05 14:05:07 +02:00
Aliaksandr Valialkin 4bca54c0bb Issue #29: use time.UTC instead of time.LoadLocation, since this call may fail on systems without certain config files 2016-01-04 15:55:30 +02:00
Aliaksandr Valialkin a89d890c8c Added WriteGzip and WriteGunzip helper functions 2016-01-04 15:27:13 +02:00
Aliaksandr Valialkin c5f2e08130 Transparently gunzip multipart form data on Request.MultipartForm() call according to @celer suggestion 2016-01-04 15:12:30 +02:00
Aliaksandr Valialkin 69a05ffcaf Issue #28: do not set default Content-Type for empty response 2016-01-04 14:56:49 +02:00
Aliaksandr Valialkin 9b0b87c951 Added URI.LastPathSegment helper function 2016-01-04 14:23:07 +02:00
Aliaksandr Valialkin 7d4b6abe47 Added short term TODO items 2016-01-02 13:52:16 +02:00
Aliaksandr Valialkin 0a78c454c7 Merge pull request #27 from mkravchuk7/master
fix typo in comment
2015-12-31 20:07:28 +02:00
MK a8ab4c12c7 fix typo in comment 2015-12-31 17:34:29 +02:00
Aliaksandr Valialkin f704d819f6 Always return multipart form body on Request.Body() call 2015-12-31 15:38:34 +02:00
Aliaksandr Valialkin e5d7485342 truncate raw headers buffer before passing to readRawHeaders 2015-12-31 15:37:41 +02:00
Aliaksandr Valialkin da83f137b7 Added SetMultipartFormBoundary* to RequestHeader 2015-12-31 14:20:21 +02:00
Aliaksandr Valialkin 0e7c44160c Added AppendGzipBytesLevel for gzipping with desired compression level 2015-12-31 12:15:55 +02:00
Aliaksandr Valialkin 51460d7747 Fixed a typo 2015-12-31 12:10:48 +02:00
Aliaksandr Valialkin 5700ef75d0 Added a test for reading gzipped request body according to @celer's email 2015-12-31 12:10:12 +02:00
Aliaksandr Valialkin 95456fa9d7 Added AppendGzipBytes and AppendGunzipBytes for simplifying gzipping/gunzipping request/response bodies 2015-12-31 12:09:21 +02:00
Aliaksandr Valialkin 85ae42bdba Do not read request body if both 'Content-Length' and 'Transfer-Encoding' headers are missing. Based on @celer's patch at https://github.com/celer/fasthttp/commit/667a8905cc6a95f223b5bd41056b1ea2861118df 2015-12-31 11:12:41 +02:00
Aliaksandr Valialkin 5a483a7e5d Added a notice that TimeoutError* functions may be used only as a last resort 2015-12-31 10:47:40 +02:00
Aliaksandr Valialkin 8b38f99229 FS: correctly detect content-type for transparently compressed files 2015-12-30 15:27:54 +02:00
Aliaksandr Valialkin 5031bb90a5 Updated readme for fileserver example 2015-12-30 15:25:20 +02:00
Aliaksandr Valialkin c20fff55a6 FS: detect file content-type with net/http.DetectContentType if the type cannot be determined by file extension 2015-12-30 15:13:50 +02:00
Aliaksandr Valialkin 842cd856a4 Added transparent compression support to helloworldserver example 2015-12-30 14:50:58 +02:00
Aliaksandr Valialkin 0d58868d33 FS: do not show compressed files ending with .fasthttp.gz in automatically generated directory index 2015-12-30 14:39:39 +02:00
Aliaksandr Valialkin f85708c120 Client-Server end-to-end benchmarks' tuning 2015-12-30 14:30:37 +02:00
Aliaksandr Valialkin 58ff6e004c code cleanup: removed unused pendingFiles member from fsHandler 2015-12-30 13:36:33 +02:00
Aliaksandr Valialkin 8cd2f8da6b Added more parallel benchmarks for the client 2015-12-29 17:18:15 +02:00
Aliaksandr Valialkin 95093e35cf Removed redundant Reset() calls on bufio.Reader/bufio.Writer/gzipWriter/flateWriter before returning them to the pool, since Reset() is immediately called after these instances are obtained from pool 2015-12-29 15:10:14 +02:00
Aliaksandr Valialkin e0568fa3fb Fixed a typo 2015-12-29 14:24:53 +02:00
Aliaksandr Valialkin f8ff9270f2 Added an example for FS 2015-12-29 14:23:35 +02:00
Aliaksandr Valialkin 55ffa05fae Ignore *.fasthttp.gz files 2015-12-29 12:29:39 +02:00