Aliaksandr Valialkin
|
9200e02eb5
|
Consistency fix: readersPool->readerPool, writersPool->writerPool
|
2015-11-09 10:42:09 +02:00 |
|
Aliaksandr Valialkin
|
4c2a55ed12
|
Set default user-agent in http request
|
2015-11-08 21:58:46 +02:00 |
|
Aliaksandr Valialkin
|
e8ffadf2df
|
Moved currentTime variable ouside request processing loop
|
2015-11-07 11:09:41 +02:00 |
|
Aliaksandr Valialkin
|
03f8f2408e
|
Increment request id and initialize request time before request reading, so log messages contain correct id and duration for request read errors
|
2015-11-06 16:34:16 +02:00 |
|
Aliaksandr Valialkin
|
5a6e973ab3
|
Log request duration in RequextCtx.Logger()
|
2015-11-06 16:21:49 +02:00 |
|
Aliaksandr Valialkin
|
f1ff68f9f1
|
Optimized args, cookies and headers parsing
|
2015-11-05 14:28:07 +02:00 |
|
Aliaksandr Valialkin
|
9fc0d48181
|
Added benchmarks for header reading
|
2015-11-05 14:26:16 +02:00 |
|
Aliaksandr Valialkin
|
227b0a4bd3
|
Trim input buffer inside decodeArg
|
2015-11-05 13:10:56 +02:00 |
|
Aliaksandr Valialkin
|
44826d0838
|
Improved Args parsing speed
|
2015-11-05 13:03:47 +02:00 |
|
Aliaksandr Valialkin
|
bb73a5cbfa
|
Trim dst buffer inside decodeCookieArg. This simplifies the code
|
2015-11-05 12:55:43 +02:00 |
|
Aliaksandr Valialkin
|
236d4bd461
|
Added Cookie.ParseBytes to be consistent with Args
|
2015-11-05 12:54:10 +02:00 |
|
Aliaksandr Valialkin
|
6fb8b96152
|
Increased cookies' parsing performance
|
2015-11-05 12:47:30 +02:00 |
|
Aliaksandr Valialkin
|
dfec0d9d36
|
Eliminated redundant memory allocation during cookie expiration time parsing
|
2015-11-05 12:12:15 +02:00 |
|
Aliaksandr Valialkin
|
87105b99cb
|
Added response cookies support
|
2015-11-05 12:07:54 +02:00 |
|
Aliaksandr Valialkin
|
a7fdc68be0
|
Enforce MaxConnsPerIP limit to connections served via Server.ServeConn()
|
2015-11-05 10:56:04 +02:00 |
|
Aliaksandr Valialkin
|
4a823fa707
|
Properly encode cookie without name
|
2015-11-04 19:02:49 +02:00 |
|
Aliaksandr Valialkin
|
a0e1b7f448
|
Added functions for obtaining cookie values from RequestHeader
|
2015-11-04 18:24:12 +02:00 |
|
Aliaksandr Valialkin
|
86ddfc73be
|
Skip empty cookies
|
2015-11-04 18:08:29 +02:00 |
|
Aliaksandr Valialkin
|
03ebc8df37
|
Properly implement Args.Has* for args with nil value
|
2015-11-04 17:59:49 +02:00 |
|
Aliaksandr Valialkin
|
4123c87e7c
|
Initial support of request cookies
|
2015-11-03 19:08:34 +02:00 |
|
Aliaksandr Valialkin
|
0d9bc5cfde
|
Extracted predefined strings into a separate file
|
2015-11-03 17:48:44 +02:00 |
|
Aliaksandr Valialkin
|
53e28a262f
|
Set 'Connection: close' header for the 'one request per conn' case in server benchmarks
|
2015-11-03 14:29:03 +02:00 |
|
Aliaksandr Valialkin
|
552dff6fd6
|
Do no hold memory (read/write buffers+RequestCtx data) for idle keep-alive connections. This should reduce memory usage for 100K+ concurrent keep-alive connections to the server
|
2015-11-03 14:16:41 +02:00 |
|
Aliaksandr Valialkin
|
d0b2b2467a
|
Properly handle the case when servers read data by small chunks
|
2015-11-03 14:04:55 +02:00 |
|
Aliaksandr Valialkin
|
1429b48135
|
Remove reference to conn from buffered reader and writer when releasing RequestCtx. This should help GC a bit :)
|
2015-11-02 19:11:09 +02:00 |
|
Aliaksandr Valialkin
|
fb362174d7
|
initRequestCtx -> initCtx for the sake of consistency
|
2015-11-02 18:28:57 +02:00 |
|
Aliaksandr Valialkin
|
6b598d3645
|
moved common code to clearSkipHeader()
|
2015-11-02 18:27:56 +02:00 |
|
Aliaksandr Valialkin
|
3eaecd9c6c
|
Added ability to limit the number of concurrent client connections per ip
|
2015-11-02 15:09:45 +02:00 |
|
Aliaksandr Valialkin
|
7c83bade48
|
Clear response before calling request handler
|
2015-10-30 12:10:27 +02:00 |
|
Aliaksandr Valialkin
|
9a0044fba4
|
Added benchmarks for obtaining header values for normalized and non-normalized keys
|
2015-10-28 18:07:23 +02:00 |
|
Aliaksandr Valialkin
|
7ba1898d05
|
Return net.Addr from RequestCtx.RemoteAddr() and net.IP from RequestCtx.RemoteIP() instead of strings
|
2015-10-27 19:02:11 +02:00 |
|
Aliaksandr Valialkin
|
4edb6bacf4
|
Use QueryString contents if QueryArgs is empty in URI.AppendBytes
|
2015-10-27 19:01:21 +02:00 |
|
Aliaksandr Valialkin
|
664d577260
|
Added SetCanonical() methods to RequestHeader and ResponseHeader
|
2015-10-27 13:36:42 +02:00 |
|
Aliaksandr Valialkin
|
d70261286c
|
Added CopyTo, VisitAll and *Bytes* helper functions to Args, RequestHeader and ResponseHeader
|
2015-10-27 12:53:33 +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
|
658c8a1172
|
Added benchmarks for 1K concurrent clients
|
2015-10-26 15:18:52 +02:00 |
|
Aliaksandr Valialkin
|
a1fca0f209
|
Fixed connection leak on pending connections queue overflow
|
2015-10-26 15:15:58 +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
|
d76f5c5aba
|
Log connection-related info on error
|
2015-10-23 19:38:16 +03:00 |
|
Aliaksandr Valialkin
|
c29a569245
|
Removed TimeoutListener, since Server now contains nesessary ReadTimeout and WriteTimeout knobs
|
2015-10-23 15:57:36 +03: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
|
7874b9245a
|
Properly implement request read timeout via SetReadDeadline(). Implement response write timeout
|
2015-10-23 13:26:15 +03:00 |
|
Aliaksandr Valialkin
|
c842617b00
|
microoptimization: convert io.ReadWriter to remoteAddrer only before use
|
2015-10-23 13:01:09 +03:00 |
|
Aliaksandr Valialkin
|
ffc2b7025d
|
Added URI path normalization, i.e. //foo//../bar converts to /foo/bar
|
2015-10-22 17:50:47 +03:00 |
|
Aliaksandr Valialkin
|
bf2a91a77b
|
Do not encode dot in args
|
2015-10-22 17:48:14 +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
|
444dfb7213
|
converted needMoreError to static error. This may improve server performance in production if clients send request headers in chunks
|
2015-10-22 14:27:30 +03:00 |
|