Commit Graph

22 Commits

Author SHA1 Message Date
Timothy Gu 1592ca1148
Use caseless Headers handling
This is unfortunately impossible to test, since the Node.js HTTP library
lower-cases all incoming headers. However, this matters for outgoing
HTTP requests. See the linked issues from the linked Fetch Standard pull
request.

See: https://github.com/whatwg/fetch/pull/476
2018-03-04 13:03:48 -08:00
Timothy Gu a8f6d79c39
Simplify header validity check
See: nodejs/node@9f55eac346
See: nodejs/node@862389b0aa
2018-03-04 12:21:40 -08:00
Timothy Gu b1cd2dd438
Better compliance with Web IDL
- Make read-only attributes actually read-only
- Set @@toStringTag on the prototype only
- Make prototype methods/getters enumerable

Based on #354.

Co-authored-by: Benjamin Seber <[email protected]>
2018-02-03 12:12:14 -08:00
Kat Marchán 09f2e30557 headers.get: add space to join (#257)
The behavior was changed in whatwg/fetch#504.
2017-04-02 08:43:46 -07:00
Gajus Kuizinas 4804a40c17 Add a special case for constructing Headers with Headers (#253)
Fixes: #251.
2017-03-20 09:22:49 -07:00
Tino Vyatkin edb28a6c50 Drop Node.js v0.12 support (#240) 2017-02-26 13:17:47 -08:00
Timothy Gu ac8ddaccb8 Improve Headers constructor argument processing 2017-01-29 08:58:16 -08:00
Timothy Gu e9db869523 Remove FOLLOW_SPEC option; make it the default behavior (#225)
* Remove !FOLLOW_SPEC mode

* Update UPGRADE-GUIDE

* Add CHANGELOG entry
2017-01-23 07:54:28 -08:00
Timothy Gu 502b604208 Fix Headers iterable initializer handling 2017-01-14 21:22:23 -08:00
Timothy Gu 552c1a601d Bring coverage up to 100% 2016-12-05 18:46:02 -08:00
Timothy Gu 7f0e50260e Add a polyfill for Node.js v0.12's broken %IteratorPrototype% 2016-11-23 15:26:35 -08:00
Timothy Gu 25ff99677d Improve Headers' iteration support
Class strings, spec-compliant forEach, etc.
2016-11-23 15:06:30 -08:00
Timothy Gu 4ae42ea5ee Fix class names for prototypes
Per Web IDL specification.
2016-11-23 14:36:21 -08:00
Timothy Gu 31bc2835dd Start using Rollup
Smaller distributed tarball.
2016-11-23 11:18:02 -08:00
Timothy Gu 53e1055845 Use Object.create(null) for Headers' internal map
Suggested by @jimmywarting.
2016-10-15 10:03:10 -07:00
Timothy Gu f829b71ddb Use babel-runtime's Iterator implementation 2016-10-15 08:21:51 -07:00
Timothy Gu 2a7ef63bc4 Add FOLLOW_SPEC mode 2016-10-15 08:21:51 -07:00
Timothy Gu 2cafdcb5e4 Validate headers 2016-10-15 08:21:51 -07:00
Timothy Gu fba873d3fe Make sure to coerce header values to string 2016-10-15 08:21:51 -07:00
Timothy Gu 82c1e78184 Allow constructing Headers with an Array 2016-10-15 08:21:51 -07:00
Timothy Gu 993d4cdea1 Convert Headers to ES2015 and implement Iterable interface (#180)
Closes #127, #174.
2016-10-08 20:51:01 -07:00
Timothy Gu 7c26fa9479 Add Babel infrastructure
No actual code has been changed yet.
2016-10-04 02:59:46 -07:00