Commit Graph

669 Commits

Author SHA1 Message Date
Aliaksandr Valialkin bfce0fa31c substituted bytes.Buffer by ByteBuffer in tests where appropriate 2016-02-12 14:15:28 +02:00
Aliaksandr Valialkin 80368e6491 Switch from bytes.Buffer to ByteBuffer where appropriate 2016-02-12 14:07:56 +02:00
Aliaksandr Valialkin 1ee286887c Substituted bytes.Buffer with ByteBuffer in marshalMultipartForm 2016-02-12 14:00:26 +02:00
Aliaksandr Valialkin b7df433642 Added benchmarks for bytes.Buffer vs ByteBuffer comparison 2016-02-12 13:56:41 +02:00
Aliaksandr Valialkin 00f18757ec Added Reset method to ByteBuffer 2016-02-12 13:56:07 +02:00
Aliaksandr Valialkin dd96137a25 Substitute bytes.Buffer with ByteBuffer when compressing response body and converting request and response to string. This shaves off one memory allocation 2016-02-11 20:03:15 +02:00
Aliaksandr Valialkin 6210374fa8 Implement io.Writer in ByteBuffer and use it instead of bytes.Buffer in isFileCompressible 2016-02-11 19:36:43 +02:00
Aliaksandr Valialkin 0aec76fa1f code cleanup 2016-02-11 19:32:38 +02:00
Aliaksandr Valialkin 6b0853e13b Mention fasthttpadaptor and expvarhandler in README 2016-02-11 12:17:44 +02:00
Aliaksandr Valialkin d988b3ebab typo fix 2016-02-11 12:14:29 +02:00
Aliaksandr Valialkin 8757b644eb Exported ByteBuffer 2016-02-11 12:12:37 +02:00
Aliaksandr Valialkin bb2a414fe8 Issues #14, #46: use @klauspost 's compress library instead of standard compress/*, since it provides better performance on average 2016-02-10 16:40:14 +02:00
Aliaksandr Valialkin df85922f86 Added (Get|Do)Deadline helper functions to Client and HostClient 2016-02-10 13:35:48 +02:00
Aliaksandr Valialkin 5507d704f9 Issue #48: added more tests and code prettifying after PR #50 2016-02-09 20:16:23 +02:00
Aliaksandr Valialkin 6cd79f25f2 Added BodyWriteTo to Request and Response 2016-02-09 20:04:46 +02:00
Aliaksandr Valialkin d8f3e1b1c8 Merge pull request #50 from kristofferpeterhansel/master
Fix parsing of fragments
2016-02-09 20:03:25 +02:00
Kristoffer Peterhänsel 2e947c76e1 Fix fragment parsing so it won't get url encoded if there is no query in front of it 2016-02-09 14:17:56 +01:00
Aliaksandr Valialkin 999348e2d4 Issue #46: use zlib instead of flate for deflate Content-Encoding 2016-02-08 16:51:03 +02:00
Aliaksandr Valialkin e72e899aa3 Issue #47: allow out-of range offsets in byte range headers according to RFC 2616 2016-02-08 16:21:49 +02:00
Aliaksandr Valialkin 338fe46307 typo fix after f340a2920f 2016-02-05 18:14:23 +02:00
Aliaksandr Valialkin f340a2920f Moved expvarhandler from fasthttputil to fasthttp root 2016-02-05 18:13:16 +02:00
Aliaksandr Valialkin 8ccfb7fc1c Added docs to expvar 2016-02-05 18:10:23 +02:00
Aliaksandr Valialkin 5dcb652364 Moved ExpvarHandler to a dedicated package in order to break import cycle 2016-02-05 18:06:54 +02:00
Aliaksandr Valialkin 72a8861efd mention fasthttputil in README 2016-02-05 17:48:43 +02:00
Aliaksandr Valialkin ec922ac0b8 typo fix 2016-02-05 17:46:49 +02:00
Aliaksandr Valialkin 700a838f12 Added expvar stats to example fileserver 2016-02-05 17:40:44 +02:00
Aliaksandr Valialkin a66138e80f added ability to filter ExpvarHandler output with regexp 2016-02-05 17:39:32 +02:00
Aliaksandr Valialkin e05941507f fasthttputil: added ExpvarHandler for serving variables exported via standard expvar package 2016-02-05 16:42:35 +02:00
Aliaksandr Valialkin 6723a2a0fc fasthttputil: renamed files: pipe -> pipeconns 2016-02-05 16:41:32 +02:00
Aliaksandr Valialkin 8c32cc0674 Fixed golint warnings 2016-02-05 13:53:53 +02:00
Aliaksandr Valialkin a2e6d65e9d Issue #15: return more clear error if the server forgets sending 'Connection: close' response header before closing the connection 2016-02-05 13:45:46 +02:00
Aliaksandr Valialkin 0458fee5cd Issue #15: make sure that io.EOF isn't returned on incomplete request/response 2016-02-05 13:22:03 +02:00
Aliaksandr Valialkin 52d4b7ca38 Issue #15: document that io.EOF is returned from Read* calls on (Request|Response)(Header)? only if the reader is closed before the first byte read 2016-02-05 13:14:36 +02:00
Aliaksandr Valialkin 913d03cc84 Do not allocate memory when constructing path inside VHostPathRewriter 2016-02-05 13:00:52 +02:00
Aliaksandr Valialkin eafcb74ce5 Call Close on user values stored via RequestCtx.SetUserValue if these values implement io.Closer 2016-02-05 12:50:58 +02:00
Aliaksandr Valialkin df213349e2 client: use TLS session cache by default 2016-02-04 20:24:00 +02:00
Aliaksandr Valialkin 08aecdd0f4 fasthttputil: pre-allocate memory in newly created byteBuffer 2016-02-04 19:48:52 +02:00
Aliaksandr Valialkin 26f2cab187 fasthttputil: pipe errors cleanup 2016-02-04 19:42:42 +02:00
Aliaksandr Valialkin 55b89a9a6a fasthttputil: properly release pipeChan 2016-02-04 18:56:58 +02:00
Aliaksandr Valialkin e0cd149b5e Enabled virtual hosting support in example fileserver 2016-02-04 17:16:43 +02:00
Aliaksandr Valialkin 5dff324211 FS: verify that the path doesn't contain '/../' only if PathRewriter is used 2016-02-04 16:44:07 +02:00
Aliaksandr Valialkin f36c218b13 FS: make sure that the path returned from PathRewriteFunc doesn't contain '/../' due to security reasons 2016-02-04 16:38:24 +02:00
Aliaksandr Valialkin a9dcd0efd0 fasthttputil: added pipe tests 2016-02-04 16:29:26 +02:00
Aliaksandr Valialkin 7e6d951c69 fasthttputil: export PipeConns 2016-02-04 16:00:58 +02:00
Aliaksandr Valialkin 61b0c5e95f InmemoryListener: added timing tests 2016-02-04 15:24:15 +02:00
Aliaksandr Valialkin c86cfcea15 InmemoryListener: fixed races in pipe implementation 2016-02-04 15:22:44 +02:00
Aliaksandr Valialkin 8f1c8f7bbe InmemoryListener: re-use byteBuffer channels 2016-02-04 14:30:09 +02:00
Aliaksandr Valialkin 484b819453 InmemoryListener: free remaining byte buffers after closing 2016-02-03 19:27:12 +02:00
Aliaksandr Valialkin 271c9c34c3 InmemoryListener: close only write end of the connection 2016-02-03 19:10:24 +02:00
Aliaksandr Valialkin a8d8ecce47 InmemoryListener: allow multiple Write() calls without Read() calls 2016-02-03 19:03:42 +02:00