Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 960 lines (590 sloc) 30.831 kB
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
1 CHANGELOG
2 =========
3
5be3c50 @essen Update CHANGELOG
essen authored
4 2.0.0-pre.1
5 -----------
6
7 * Drop R16 support
8
9 * Breaking update of the cowboy_req interface
10
11 Simplify the interface for most cowboy_req functions. They all return
12 a single value except the four body reading functions. The reply functions
13 now only return a Req value.
14
15 Access functions do not return a Req anymore.
16
17 Functions that used to cache results do not have a cache anymore.
18
19 The interface for accessing query string and cookies has therefore
20 been changed.
21
22 None of the functions return an error tuple anymore. It either works
23 or crashes. Cowboy will attempt to provide an appropriate status code
24 in the response of crashed handlers.
25
26 As a result, the content decode function has its return value changed
27 to a simple binary, and the body reading functions only return on success.
28
29 * Change interface for reading the query string and cookies
30
31 There are now three query string functions: qs/1 provides access
32 to the raw query string value; parse_qs/1 returns the query string
33 as a list of key/values; match_qs/2 returns a map containing the
34 values requested in the second argument, after applying constraints
35 and default value.
36
37 Similarly, there are two cookie functions: parse_cookies/1 and
38 match_cookies/2. More match functions will be added in future commits.
39
40 * Unify the init and terminate callbacks
41
42 `init/3` becomes `init/2`, its first argument was removed. Its return
43 value has changed, it now returns an `ok` tuple or a `Mod` tuple, the
44 latter allowing to switch to a different handler type and also able
45 to take timeout and hibernate options. The sub protocol interface has
46 been changed and receives these options now.
47
48 rest_init/2 and rest_terminate/2 have been removed.
49
50 websocket_init/3 and websocket_terminate/3 have been removed.
51
52 terminate/3 is now optional. It is called regardless of
53 the type of handler, including REST and Websocket.
54
55 Terminate reasons for all handler types have been documented.
56 The terminate callback is now appropriately called in all cases
57 (or should be).
58
59 * Plain HTTP handlers are virtually removed
60
61 You can use the `init/2` function to do the work of a plain HTTP
62 handler. The behavior is defined in `cowboy_handler`.
63
64 * Loop handlers are now the `cowboy_loop` sub protocol
65
66 * Loop handlers now use the same return values as Websocket
67
68 * Behaviors have been moved into the module implementing them
69
70 That means `cowboy_loop`, `cowboy_rest` and `cowboy_websocket`.
71
72 * Change the format for constraints used by the router
73
74 * Remove the onrequest hook
75
76 Use a middleware instead.
77
78 * Remove the `error` return value from middlewares
79
80 * Remove the REST `known_content_type` callback
81
82 * Improve absolute URI support
83
84 * Fix two edge cases when the request-line is invalid
85
86 * Guide reorganization and partial rewrite
87
2d6ff3d @essen Update CHANGELOG
essen authored
88 1.0.0
89 -----
90
91 * Drop R15 support
92
93 * Update erlang.mk, Ranch and Cowlib to 1.0.0
94
95 * Complete the user guide and simplify the Getting started chapter
96
97 * Document the HTTP status codes Cowboy may send in the manual
98
99 * Provide installable man pages (see README)
100
101 * Support ad-hoc keep-alive for HTTP/1.0 clients
102
103 * Fix SPDY parsing error when many frames were received in one packet
104
105 * Reply with 400 instead of 422 in cowboy_rest
106
107 * Reply with 400 instead of 500 on header parsing crash
108
109 * Remove deprecated body reading interface (see 0.10.0 notes)
110
0a27247 @essen Update CHANGELOG and ROADMAP
essen authored
111 0.10.0
112 ------
113
114 * Update Ranch to 0.10 and Cowlib to 0.6.2
115
116 * Update the body reading API to allow controlling rate of transfer
117
118 The lack of this feature was causing various timeout issues
119 in some environments.
120
121 The body/2 function now takes a Req and a list of options. The older
122 interface can still be used until Cowboy 1.0.
123
124 The body_qs/2, part/2 and part_body/2 also accept this list of
125 options, and pass it down to the body/2 call. The default options
126 vary between the different functions.
127
128 The return value of the function has changed. Older code should work
129 without modification but you should definitely still test it.
130
131 All functions appropriately decode transfer and content encoding.
132 There is no need to have a special case for that anymore.
133
134 The body/1,2 function supports streaming, with the same interface
135 as the part_body/1,2 function.
136
137 * Deprecate the cowboy_req:init_stream, stream_body and skip_body functions
138
139 They will be removed in Cowboy 1.0.
140
141 * Add support for multipart
142
143 The cowboy_req:part/1,2 and cowboy_req:part_body/1,2 can be
144 used for reading a multipart body.
145
146 Documentation has been added.
147
148 The old undocumented multipart functions were removed.
149
150 * Allow the onresponse hook to override only status and headers
151
152 Previously it wasn't possible to override them without also
153 overriding the body. The new return value is currently marked
154 as experimental.
155
156 * Make loop handlers work with SPDY
157
158 * Fix a race condition with loop handlers and keepalive requests
159
160 * Fix parsing of accept-language header
161
162 * Fix parsing of authorization header with empty passwords
163
164 * Fix multiline headers handling
165
166 * Various optimizations
167
168 All code that is moved to cowlib is optimized at the same time
169 and benchmarks get added for all functions.
170
171 The parsing of connection, content-length and transfer-encoding
172 has been optimized.
173
174 Chunked transfer decoding has been optimized.
175
176 * Enable +warn_missing_spec by default and fix specs
177
178 * Remove the non-documented cowboy_client module; use gun instead
179
180 * Numerous documentation updates and tweaks
181
182 The guide now has a REST principles chapter and revised
183 and completed Websocket chapters, alongside a new multipart chapter.
184
185 * Add a multipart file upload example
186
187 * Test suites are being reworked and greatly improved
188 * Test Cowboy across all releases from R15B01 to 17.0, plus maint and master
189 * The Autobahn test suite is now always ran (as long as it's installed)
190 * Expected error reports are now silenced (but still logged)
191 * Applications are now only started once from a ct hook
192
b6413dc @essen Update CHANGELOG
essen authored
193 0.9.0
194 -----
195
196 * Update Ranch to 0.9.0
197
198 * SPDY is no longer experimental and is documented
199
200 The SPDY development has been sponsored by the LeoFS project.
201
202 * Review, improve and document cowboy_static
203 * Much simplified configuration
204 * Etag generation is now enabled by default
205 * Web mimetypes are now detected by default
206 * Optionally a huge list of mimetypes can also be used
207 * It not try to magically find the priv directory anymore, use ERL_LIBS
208
209 * Remove the pretty printing of errors
210
211 Cowboy will no longer print errors, it will instead let the process
212 crash properly, so that links can work with Cowboy. Ranch will catch
213 errors and print a one-liner containing all the error information
214 instead.
215
216 * Trigger a human readable error when routes lack the starting slash
217
218 * Add websocket_compress metadata
219
220 * Fix parsing of hosts given as IPv6 addresses
221
222 * Fix the decoding of chunked bodies
223
224 * Fix handling of close, ping and pong Websocket replies
225
226 * Fix the x-webkit-deflate-frame Websocket extension
227
228 * Fix PUT behavior in cowboy_rest when creating a resource at the request URL
229
230 * Fix warnings with the reltool GUI
231
232 * Start moving code in a new dependency, cowlib
233
234 The code moved there is mostly parsing code and utility functions.
235 Most of it was in the undocumented cowboy_http module before.
236
237 * Optimize cookie date building and query string building/parsing
238
239 * Great number of improvements and additions to the user guide
240
241 * Convert all examples to releases using the erlang.mk+relx combo
242
243 Some examples have also been fixed or slightly improved.
244 The elixir example is now on a separate repository maintained
245 independently. More examples in this language exist in that
246 other repository.
247
b794439 @essen Update CHANGELOG
essen authored
248 0.8.6
249 -----
250
251 * Make sure Cowboy compiles on R16B01
252
253 * Update Ranch to 0.8.4
254
255 * Add experimental support for the x-webkit-deflate-frame Websocket extension
256
257 This allows Cowboy to handle compressed Websocket frames,
258 lowering the amount of data that needs to be sent over the
259 socket.
260
261 The extension will only be used if compression was enabled
262 using the `compress` protocol option.
263
264 * Add experimental SPDY support
265
266 SPDY is a new protocol implemented by most browsers. It is
267 the basis for what will become HTTP/2.0.
268
269 To use SPDY, you need to call `start_spdy` where you would
270 have used `start_https` before.
271
272 This protocol is still incomplete. It cannot accept request
273 bodies yet, making most methods other than GET and HEAD
274 not too useful at this point.
275
276 * Allow an empty method list in allowed_methods
277
278 * The charset parameter of content-types is now always lowercase
279
280 * Don't overwrite the stacktrace when a REST handler crashes
281
282 * Don't crash when the Cookie header is empty
283
284 * Don't crash on invalid Accept-Encoding header when replying
285
df05b4c @essen Update CHANGELOG
essen authored
286 0.8.5
287 -----
288
289 * Add the Cowboy Function Reference
290
291 Everything documented in the function reference is the API
292 that will make it to Cowboy 1.0.
293
294 * Use erlang.mk
295
296 The project is of course still compatible with rebar
297 and can be used as a dependency just fine.
298
299 * Update Ranch to 0.8.3
300
301 * Remove cowboy_req:fragment/1
302
303 No well-written client is sending the fragment with the URL.
304
305 * Add cowboy_req:set_resp_body_fun(chunked, Fun, Req)
306
307 * Improve various typespecs
308
309 * Change the return value of cowboy_req:version/1
310
311 We now have 'HTTP/1.1' instead of {1, 1} and 'HTTP/1.0'
312 instead of {1, 0}.
313
314 * Change the return value of REST accept callbacks
315
316 The Path return value becomes {true, Path}.
317
318 * Change the return value of REST charsets_provided/2
319
320 It was incorrectly expecting a list of tuples instead of
321 a list of charsets.
322
323 * Move various types to the cowboy module
324 * cowboy_http:version() to cowboy:http_version()
325 * cowboy_http:headers() to cowboy:http_headers()
326 * cowboy_http:status() to cowboy:http_status()
327 * cowboy_protocol:onrequest_fun() to cowboy:onrequest_fun()
328 * cowboy_protocol:onresponse_fun() to cowboy:onresponse_fun()
329
330 * Add type cowboy_protocol:opts()
331
332 * Fix a REST bug with the OPTIONS method
333
334 * Fix a REST bug where iso-8859-1 would be incoditionally selected
335
46b2ea0 @essen Update CHANGELOG
essen authored
336 0.8.4
337 -----
338
339 * Cookie names are now back to being case sensitive
340
341 This should be more in line with what browsers do and what
342 users would expect.
343
344 * REST is no longer experimental and is documented
345
346 * REST behavior fixed when used with the POST method
347
348 Removes process_post, post_is_create, create_path, created_path
349 callbacks. It is up to the resource accept callback to decide
350 what to do when the POST method is used. Depending on the return
351 value Cowboy will determine if the resource was created or not.
352
353 * Removes the put_path meta value in REST
354
355 * Fix an issue in REST with the PATCH method
356
357 Content-types were not normalized as expected, preventing the
358 use of the binary form for content-types.
359
360 * Add default operations for the OPTIONS method in REST
361
362 The default will be to set the Allow header in the response
363 based on the return value from allowed_methods.
364
365 * Add default content_types_provided "text/html" maps to to_html
366
367 This allows non-HEAD/GET methods to work without defining
368 the callback explicitly.
369
370 * Reject invalid content-types explicitly in REST
371
372 * Don't accept TRACE or CONNECT methods by default in REST
373
374 * Remove cowboy_req:peer_addr/1
375
376 Because each server's proxy situation differs, it is better
377 that this function is implemented by the application directly.
378
379 The X-Forwarded-For header can now be parsed using
380 cowboy_req:parse_header/2.
381
382 * Switch the arguments to cowboy_req:stream_body/2
383
384 They were in the wrong order compared to the rest of the module.
385
386 * Add parser for the Range header
387
388 * Do not crash if connection times out while sending a file using sendfile
389
390 * Ensure we can fetch the body in the info/3 function of loop handlers
391
392 * Update Ranch to 0.8.1
393
394 * Reorganize and optimize the test suites
395
ea93541 @essen Update CHANGELOG
essen authored
396 0.8.3
397 -----
398
399 * Remove init_stream/5, add stream_body/2
400
401 It's better to allow configuring the streamed chunk size on
402 a per chunk basis. Also easier to use.
403
404 * Update Ranch to 0.8.0
405
406 Much faster. Also improved stability.
407
ed05627 @essen Update CHANGELOG
essen authored
408 0.8.2
409 -----
410
411 * Add error_hook and ssl_hello_world example
412
413 * Greatly improve the performance of body reading operations
414
415 The streamed chunk size is now configurable through the new
416 function cowboy_req:init_stream/5.
417
418 * Add cowboy_req:body/2 and cowboy_req:body_qs/2
419
420 These functions take an additional argument indicating the
421 maximum size of the body. They will return {error, badlength}
422 if the size is too large, or {error, chunked} if the body
423 was sent using the chunked Transfer-Encoding and its size
424 cannot be determined.
425
426 The function body/1 is now an alias to body/2 with a maximum
427 body size of 8MB. Likewise, the function body_qs/1 is an alias
428 of body_qs/2 with a maximum body size of 16KB.
429
430 * Properly handle explicit identity Transfer-Encoding in body_length/1
431
432 * Small but noticeable performance improvement in the critical path
433
434 We stopped using binary:match/2 in favor of custom functions.
435 This makes Cowboy 0.5ms faster per request.
436
437 * Prevent loop handlers from awakening after sending a response
438
439 * Optimize cowboy_static initialization code
440
441 * Make path checks in cowboy_static cross-platform
442
443 * Allow '*' for REST content types parameters in content_types_provided
444
445 * Fix cowboy_router types
446
447 * Update Ranch to 0.6.2; adds support for two new SSL options
448
449 * Improve documentation
450
fd636c9 @essen Update CHANGELOG
essen authored
451 0.8.1
452 -----
453
454 * Add eventsource, web_server examples; improve rest_pastebin example
455
456 * Add cowboy:set_env/3 to more conveniently update the dispatch list
457
458 * Add cowboy_sub_protocol behaviour
459
460 * Fix cowboy_req:has_body/1 when Content-Length == 0
461
462 * Fix passing of state to websocket_terminate/3 on server close
463
464 * Fix compilation with +native
465
466 * Compile with more warnings enabled by default; fix warnings
467
468 * Set the socket in passive mode after the loop handler terminates
469
470 * Improve typespecs
471
433d463 @essen Update CHANGELOG
essen authored
472 0.8.0
473 -----
f6791b0 @essen Update CHANGELOG
essen authored
474
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
475 * This release drops R14 compatibility
f6791b0 @essen Update CHANGELOG
essen authored
476
433d463 @essen Update CHANGELOG
essen authored
477 Behaviours now use the -callback attribute which is supported only
478 since R15B.
479
480 * Add a user guide
481
482 * Add or update many examples
483
484 Add basic_auth, compress_response, cookie, elixir_hello_world,
485 markdown_middleware, rest_pastebin, rest_stream_response
486 and websocket examples.
487
488 Rename the static example to static_world for clarity.
489
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
490 * Add CONTRIBUTING.md file
a20702f @essen Add CONTRIBUTING.md file
essen authored
491
433d463 @essen Update CHANGELOG
essen authored
492 * Use Ranch 0.6.1 for connection handling
f6791b0 @essen Update CHANGELOG
essen authored
493
494 To start listeners you can now use cowboy:start_http/4 for HTTP,
495 and cowboy:start_https/4 for HTTPS. The proper transport and
496 protocol modules will be used.
497
433d463 @essen Update CHANGELOG
essen authored
498 * Add protection against slowloris vulnerability
499
500 This protection is always enabled and has no impact on the performance
501 of the system.
502
503 * Add a better routing syntax
504
505 * If a binding is used twice in routing, values must now be identical
506
507 * Add support for a configurable chain of middlewares
508
509 Routing and handling are now two separate middlewares that can be
510 replaced as needed.
511
512 * Fix application dependencies
513
514 The crypto application must be started before Cowboy.
fb07493 @essen Update CHANGELOG
essen authored
515
433d463 @essen Update CHANGELOG
essen authored
516 The inets application is no longer needed. A few functions from
517 that application were used by mistake in the REST code.
fb07493 @essen Update CHANGELOG
essen authored
518
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
519 * Shorten the name of many modules
520 * cowboy_http_protocol becomes cowboy_protocol
521 * cowboy_http_req becomes cowboy_req
522 * cowboy_http_rest becomes cowboy_rest
523 * cowboy_http_static becomes cowboy_static
524 * cowboy_http_websocket becomes cowboy_websocket
f6791b0 @essen Update CHANGELOG
essen authored
525
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
526 * Introduce the cowboy_req:req() opaque type
f6791b0 @essen Update CHANGELOG
essen authored
527
528 The include/http.hrl file was removed. Users are expected to use
529 the cowboy_req API to access or modify the Req object.
530
433d463 @essen Update CHANGELOG
essen authored
531 This required a lot of changes so cleanup and optimizations were
f6791b0 @essen Update CHANGELOG
essen authored
532 performed where possible.
533
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
534 * Add many cowboy_req functions
535 * cowboy_req:delete_resp_header/2 deletes a previously set resp header
536 * cowboy_req:set_meta/3 sets metadata in the Req object
537 * cowboy_req:to_list/1 converts the Req object to a list of key/values
538 * cowboy_req:fragment/1 returns the request URL fragment
539 * cowboy_req:host_url/1 returns the request URL without the path or qs
540 * cowboy_req:url/1 returns the full request URL
433d463 @essen Update CHANGELOG
essen authored
541 * cowboy_req:set_resp_body_fun/2 for body streaming with no known length
542
543 * Improve the body streaming interface in cowboy_req
544
545 The function now receives the Transport and Socket directly as arguments.
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
546
547 * Rename or drop many cowboy_req functions
433d463 @essen Update CHANGELOG
essen authored
548 * cowboy_req:raw_host/1 becomes cowboy_req:host/1, old function dropped
549 * cowboy_req:raw_path/1 becomes cowboy_req:path/1, old function dropped
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
550 * cowboy_req:raw_qs/1 becomes cowboy_req:qs/1
433d463 @essen Update CHANGELOG
essen authored
551 * Remove cowboy_req:body/2
552 * Remove cowboy_req:transport/1
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
553
554 * Change the signature of many cowboy_req functions
555 * parse_header now returns {ok, any(), Req} instead of {any(), Req}
556 * body_qs now returns {ok, QsVals, Req} instead of {QsVals, Req}
557 * multipart_data now returns {headers, Headers, Req} instead of
f6791b0 @essen Update CHANGELOG
essen authored
558 {{headers, Headers}, Req} and {body, Body, Req} instead of
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
559 {{body, Body}, Req}
560 * set_resp_* functions now return Req instead of {ok, Req}
433d463 @essen Update CHANGELOG
essen authored
561 * has_body now returns boolean()
562
563 * Rewrote cookie code
564
565 In short we now do the same thing as PHP when setting cookies. This
566 allows us to be fairly confident that our code will work on the vast
567 majority of browsers.
981ea35 @essen Update CHANGELOG
essen authored
568
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
569 * Fix consistency issues caused by erlang:decode_packet/3
570 * The method is now always a case sensitive binary string
571 * Note that standard method names are uppercase (e.g. <<"GET">>)
572 * Header names are now always lowercase binary string
981ea35 @essen Update CHANGELOG
essen authored
573
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
574 * The max_line_length cowboy_protocol option was replaced by 3 new options:
575 * max_request_line_length, defaults to 4096 bytes
576 * max_header_name_length, defaults to 64 bytes
577 * max_header_value_length, defaults to 4096 bytes
c4858d9 @essen Update CHANGELOG
essen authored
578
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
579 * Add max_headers option, limiting the number of headers; defaults to 100
fb07493 @essen Update CHANGELOG
essen authored
580
433d463 @essen Update CHANGELOG
essen authored
581 * The max_keepalive option now defaults to 100 instead of infinity
582
583 * Change terminate/2 to terminate/3 in the HTTP handler interface
584
585 * Enhance the loop handler API
586 * Connection close is now better detected
587 * Fix an internal message leak
588
589 * Enhance the Websocket API
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
590 * Change a websocket error from {error, protocol} to {error, badframe}
591 * Allow websocket handlers to reply more than one frame
592 * Check for errors when calling Transport:send/2 to avoid crashes
433d463 @essen Update CHANGELOG
essen authored
593 * Add close, {close, Payload}, {close, StatusCode, Payload},
594 ping, pong frame types for replies
595 * Ensure websocket_terminate is always called
596 * Improve timeout handling
597 * Remove support for the old hixie76 protocol
598 * Add parsing support for Sec-Websocket-Protocol
599 * Check for UTF-8 correctness of text frames
600 * Perform unmasking and UTF-8 validation on the fly
601 * Reject clients that send unmasked frames
602 * Add cowboy_websocket:close_code/0 type
603
604 * Enhance the REST API
605 * Fix charset handling
606 * Add PATCH support
607 * Add created_path callback, used if create_path was not defined
608 * Make sure rest_terminate is always called
609
610 * Improved HTTP standard compatibility
611 * Revised status code used in responses
612 * Implement authorization header parsing
613 * Add opt-in automatic response body compression
614
615 * Improve lager compatibility
616
617 We format errors in a special way so that lager can recognize Cowboy
618 errors and put them on a single line.
fb07493 @essen Update CHANGELOG
essen authored
619
433d463 @essen Update CHANGELOG
essen authored
620 * Remove the urldecode cowboy_protocol option
f6791b0 @essen Update CHANGELOG
essen authored
621
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
622 * Add cowboy_protocol:onrequest_fun/0 and :onresponse_fun/0 types
f6791b0 @essen Update CHANGELOG
essen authored
623
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
624 * Add the body data to onresponse_fun/0 callback
c4858d9 @essen Update CHANGELOG
essen authored
625
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
626 * Avoid a duplicate HTTP reply in cowboy_websocket:upgrade_error/1
f6791b0 @essen Update CHANGELOG
essen authored
627
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
628 * Fix use of the Vary header, was named Variances in the previous code
fb07493 @essen Update CHANGELOG
essen authored
629
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
630 * Improve returned status code for HTTP and REST
fb07493 @essen Update CHANGELOG
essen authored
631
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
632 * Fix charsets_provided return value
fb07493 @essen Update CHANGELOG
essen authored
633
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
634 * Allow passing {M, F} for the mimetype function to cowboy_static
fb07493 @essen Update CHANGELOG
essen authored
635
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
636 * Can now upgrade protocols with {upgrade, protocol, P, Req, Opts}
fb07493 @essen Update CHANGELOG
essen authored
637
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
638 * Cowboy now only expects universal time, never local time
fb07493 @essen Update CHANGELOG
essen authored
639
433d463 @essen Update CHANGELOG
essen authored
640 * Do not try skipping the body if the connection is to be closed
641
642 * Add cowboy_bstr:to_upper/1, cowboy_bstr:capitalize_token/1
643
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
644 * Many, many optimizations for the most critical code path
f6791b0 @essen Update CHANGELOG
essen authored
645
af07e04 @essen Update version to 0.6.1
essen authored
646 0.6.1
647 -----
648
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
649 * Add hello_world, rest_hello_world, chunked_hello_world,
af07e04 @essen Update version to 0.6.1
essen authored
650 echo_get, echo_post and static examples.
651
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
652 * Add support for the "Expect: 100-continue" header.
af07e04 @essen Update version to 0.6.1
essen authored
653
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
654 * Keep the original 'Host' header value instead of modifying it.
af07e04 @essen Update version to 0.6.1
essen authored
655
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
656 * Fix use of parsed headers cache.
af07e04 @essen Update version to 0.6.1
essen authored
657
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
658 * REST: fix the matching of charsets.
af07e04 @essen Update version to 0.6.1
essen authored
659
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
660 * REST: allow <<"type/subtype">> format for content_types_accepted.
af07e04 @essen Update version to 0.6.1
essen authored
661
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
662 * Improve typespecs.
af07e04 @essen Update version to 0.6.1
essen authored
663
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
664 0.6.0
665 -----
666
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
667 * Add multipart support
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
668
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
669 * Add chunked transfer decoding support
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
670
671 Done by reworking the body reading API. Now all the body
672 reading goes through the cowboy_http_req:stream_body/1
673 function. This function takes care of handling both the
674 Transfer-Encoding and the Content-Encoding, returning
675 properly decoded data ready for consumption.
676
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
677 * Add fragmented websocket messages support
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
678
679 Properly tested by the addition of the Autobahn websocket
680 test suite to our toolbox. All tests pass except a few
681 related to UTF-8 handling, as Cowboy does no checks on that
682 end at this point.
683
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
684 * Add 'onrequest' and 'onresponse' hooks
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
685
686 The first can be used for all the special cases you may have
687 that can't be dealt with otherwise. It's also pretty good for
688 writing access logs or rewriting URLs.
689
690 The second can be used for logging errors or replacing error
691 pages, amongst others.
692
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
693 * Add cowboy:get_protocol_options/1 and cowboy:set_protocol_options/2
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
694
695 These functions allow for retrieving a listener's protocol options,
696 and for modifying them while the listener is running. This is
697 most useful to upgrade the dispatch list. The upgrade applies
698 to all the future connections.
699
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
700 * Add the sockname/1 function to TCP and SSL transports
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
701
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
702 * Improve SSL transport support
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
703
704 Add support for specifying the ciphers. Add CA support. Make
705 specifying the password optional.
706
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
707 * Add new HTTP status codes from RFC 6585
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
708
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
709 * Add a 'file' option to cowboy_http_static
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
710
711 This allows for mapping /folder/ paths to a /folder/index.html file.
712
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
713 * Add the '*' catch all Content-Type for REST
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
714
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
715 * Add {halt, Req, State} as a possible return value for REST
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
716
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
717 * Add absolute URI support for requests
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
718
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
719 * Add cowboy_http:x_www_form_urlencoded/2
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
720
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
721 * Various REST bug fixes
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
722
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
723 * Do not send chunked replies for HTTP/1.0 connections
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
724
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
725 * Fix a DST bug in the cookies code
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
726
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
727 * Fix a bug with setting cookie values containing slashes
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
728
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
729 * Fix a small timer leak when using loop/websocket timeouts
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
730
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
731 * Make charset and media type parsing more relaxed
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
732
733 This is to accomodate some widely used broken clients.
734
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
735 * Make error messages more readable
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
736
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
737 * Fix and improve type specifications
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
738
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
739 * Fix a bug preventing documentation from being generated
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
740
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
741 * Small improvements to the documentation
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
742
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
743 * Rework the HTTP test suite
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
744
745 The suite now uses an integrated Cowboy HTTP client. The client
746 is currently experimental and shouldn't be used.
747
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
748 * Add many many tests.
0c2e222 Update version to 0.6.0
Loïc Hoguin authored
749
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
750 0.4.0
751 -----
752
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
753 * Set the cowboy_listener process priority to high
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
754
755 As it is the central process used by all incoming requests
756 we need to set its priority to high to avoid timeouts that
757 would happen otherwise when reaching a huge number of
758 concurrent requests.
759
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
760 * Add cowboy:child_spec/6 for embedding in other applications
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
761
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
762 * Add cowboy_http_rest, an experimental REST protocol support
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
763
764 Based on the Webmachine diagram and documentation. It is a
765 new implementation, not a port, therefore a few changes have
766 been made. However all the callback names are the same and
767 should behave similarly to Webmachine.
768
769 There is currently no documentation other than the Webmachine
770 resource documentation and the comments found in cowboy_http_rest,
771 which itself should be fairly easy to read and understand.
772
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
773 * Add cowboy_http_static, an experimental static file handler
45f37b8 Update CHANGELOG
Loïc Hoguin authored
774
775 Makes use of the aforementioned REST protocol support to
776 deliver files with proper content type and cache headers.
777
778 Note that this uses the new file:sendfile support when
779 appropriate, which currently requires the VM to be started
780 with the +A option defined, else errors may randomly appear.
781
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
782 * Add cowboy_bstr module for binary strings related functions
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
783
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
784 * Add cowboy_http module for HTTP parsing functions
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
785
786 This module so far contains various functions for HTTP header
787 parsing along with URL encoding and decoding.
788
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
789 * Remove quoted from the default dependencies
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
790
791 This should make Cowboy much easier to compile and use by default.
792 It is of course still possible to use quoted as your URL decoding
793 library in Cowboy thanks to the newly added urldecode option.
794
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
795 * Fix supervisor spec for non dynamic modules to allow upgrades to complete
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
796
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
797 * Add cowboy:accept_ack/1 for a cleaner handling of the shoot message
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
798
799 Before, when the listener accepted a connection, the newly created
800 process was waiting for a message containing the atom 'shoot' before
801 proceeding. This has been replaced by the cowboy:accept_ack/1 function.
802
803 This function should be used where 'shoot' was received because the
804 contents of the message have changed (and could change again in the
805 distant future).
806
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
807 * Update binary parsing expressions to avoid hype crashes
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
808
809 More specifically, /bits was replaced by /binary.
810
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
811 * Rename the type cowboy_dispatcher:path_tokens/0 to tokens/0
156c84f Use calendar date and time types exported since R14B04
Loïc Hoguin authored
812
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
813 * Remove the cowboy_clock:date/0, time/0 and datetime/0 types
156c84f Use calendar date and time types exported since R14B04
Loïc Hoguin authored
814
815 The calendar module exports those same types properly since R14B04.
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
816
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
817 * Add cacertfile configuration option to cowboy_ssl_transport
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
818
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
819 * Add cowboy_protocol behaviour
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
820
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
821 * Remove -Wbehaviours dialyzer option unavailable in R15B
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
822
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
823 * Many tests and specs improvements
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
824
825 ### cowboy_http_req
826
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
827 * Fix a crash when reading the request body
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
828
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
829 * Add parse_header/2 and parse_header/3
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
830
831 The following headers can now be semantically parsed: Connection, Accept,
832 Accept-Charset, Accept-Encoding, Accept-Language, Content-Length,
833 Content-Type, If-Match, If-None-Match, If-Modified-Since,
834 If-Unmodified-Since, Upgrade
835
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
836 * Add set_resp_header/3, set_resp_cookie/4 and set_resp_body/2
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
837
838 These functions allow handlers to set response headers and body
839 without having to reply directly.
840
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
841 * Add set_resp_body_fun/3
45f37b8 Update CHANGELOG
Loïc Hoguin authored
842
843 This function allows handlers to stream the body of the response
844 using the given fun. The size of the response must be known beforehand.
845
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
846 * Add transport/1 to obtain the transport and socket for the request
45f37b8 Update CHANGELOG
Loïc Hoguin authored
847
848 This allows handlers to have low-level socket access in those cases
849 where they do need it, like when streaming a response body with
850 set_resp_body_fun/3.
851
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
852 * Add peer_addr/1
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
853
854 This function tries to guess the real peer IP based on the HTTP
855 headers received.
856
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
857 * Add meta/2 and meta/3 to save useful protocol information
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
858
859 Currently used to save the Websocket protocol version currently used,
860 and to save request information in the REST protocol handler.
861
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
862 * Add reply/2 and reply/3 aliases to reply/4
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
863
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
864 * Add upgrade_reply/3 for protocol upgrades
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
865
866 ### cowboy_http_protocol
867
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
868 * Add the {urldecode, fun urldecode/2} option
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
869
870 Added when quoted was removed from the default build. Can be used to
871 tell Cowboy to use quoted or any other URL decoding routine.
872
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
873 * Add the max_keepalive option
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
874
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
875 * Add the max_line_length option
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
876
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
877 * Allow HTTP handlers to stop during init/3
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
878
879 To do so they can return {shutdown, Req, State}.
880
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
881 * Add loops support in HTTP handlers for proper long-polling support
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
882
883 A loop can be entered by returning either of {loop, Req, State},
884 {loop, Req, State, hibernate}, {loop, Req, State, Timeout} or
885 {loop, Req, State, Timeout, hibernate} from init/3.
886
887 Loops are useful when we cannot reply immediately and instead
888 are waiting for an Erlang message to be able to complete the request,
889 as would typically be done for long-polling.
890
891 Loop support in the protocol means that timeouts and hibernating
892 are well tested and handled so you can use those options without
893 worrying. It is recommended to set the timeout option.
894
895 When a loop is started, handle/2 will never be called so it does
896 not need to be defined. When the request process receives an Erlang
897 message, it will call the info/3 function with the message as the
898 first argument.
899
900 Like in OTP, you do need to set timeout and hibernate again when
901 returning from info/3 to enable them until the next call.
902
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
903 * Fix the sending of 500 errors when handlers crash
45f37b8 Update CHANGELOG
Loïc Hoguin authored
904
905 Now we send an error response when no response has been sent,
906 and do nothing more than close the connection if anything
907 did get sent.
908
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
909 * Fix a crash when the server is sent HTTP responses
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
910
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
911 * Fix HTTP timeouts handling when the Request-Line wasn't received
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
912
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
913 * Fix the handling of the max number of empty lines between requests
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
914
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
915 * Fix the handling of HEAD requests
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
916
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
917 * Fix HTTP/1.0 Host header handling
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
918
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
919 * Reply status 400 if we receive an unexpected value or error for headers
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
920
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
921 * Properly close when the application sends "Connection: close" header
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
922
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
923 * Close HTTP connections on all errors
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
924
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
925 * Improve the error message for HTTP handlers
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
926
927 ### cowboy_http_websocket
928
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
929 * Add websocket support for all versions up to RFC 6455
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
930
931 Support isn't perfect yet according to the specifications, but
932 is working against all currently known client implementations.
933
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
934 * Allow websocket_init/3 to return with the hibernate option set
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
935
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
936 * Add {shutdown, Req} return value to websocket_init/3 to fail an upgrade
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
937
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
938 * Fix websocket timeout handling
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
939
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
940 * Fix error messages: wrong callback name was reported on error
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
941
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
942 * Fix byte-by-byte websocket handling
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
943
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
944 * Fix an issue when using hixie-76 with certain proxies
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
945
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
946 * Fix a crash in the hixie-76 handshake
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
947
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
948 * Fix the handshake when SSL is used on port 443
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
949
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
950 * Fix a crash in the handshake when cowboy_http_req:compact/1 is used
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
951
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
952 * Fix handshake when a query string is present
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
953
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
954 * Fix a crash when the Upgrade header contains more than one token
52c177f Add CHANGELOG.md file
Loïc Hoguin authored
955
956 0.2.0
957 -----
958
181d0ed @essen Small Markdown fixes to better follow the specs
essen authored
959 * Initial release.
Something went wrong with that request. Please try again.