Commit graph

15 commits

Author SHA1 Message Date
Cheng Zhao
ceacadb4f4 fix: pass full response headers in net module (#21552) 2020-01-14 09:36:08 -08:00
Cheng Zhao
d5192853f9
fix: name and expirationDate should be optional when setting cookie (#21454)
* fix: correctly set cookie date

* fix: name is not required for setting cookie

* test: clear cookie after each cookie test

* test: should test session property

* chore: style fixes
2019-12-11 16:44:49 +09:00
Jeremy Apthorp
092e00f7f0
fix: fix ClientRequest.getUploadProgress (#21388) 2019-12-06 13:14:44 -08:00
Jeremy Apthorp
d25256dcf5
refactor: rewrite the net module to simplify state tracking (#21244) 2019-11-26 17:01:13 -08:00
OJ Kwon
ca61d2fae7 fix: allow reading body from non-2xx responses in net.request (#21055)
* fix(urlrequest): allow non-2xx repsponse results

- closes #21046

* test(net): add test cases to verify non-2xx body

* test(session): update spec to match clientrequest behavior

* test(net): update test cases to match clientrequest behavior

* spec: clean up async net spec
2019-11-25 14:34:25 -08:00
Jeremy Apthorp
2e25999c52
test: refactor net tests (#21265) 2019-11-25 12:56:18 -08:00
Jeremy Apthorp
4f1536479e
fix: implement 'login' event for net.ClientRequest (#21096) 2019-11-14 10:01:18 -08:00
Jeremy Apthorp
ecd9e1f26e
chore: lint spec-main (#20835) 2019-11-01 13:37:02 -07:00
Jeremy Apthorp
1dc1ef6091 test: ensure cleanup of net requests in tests (#20510)
ref #19389
2019-10-10 14:14:41 +02:00
Electron Bot
eb2d2264d0 chore: bump chromium to 63be48daea281d4f8c834c2e707a7 (master) (#19923) 2019-09-18 15:58:00 -04:00
Cheng Zhao
4eee71ffbf feat: migrate webRequest module to NetworkService (Part 9) (#19976)
* no need to get WebContents for URLLoaderFactory

* consult embedder for network_factory created in net module

* set disable_web_security to false

* re-enable webRequest tests in net module
2019-08-27 09:12:33 -07:00
Samuel Attard
cfd230d7f1
docs: remove implicit 'any' and 'Object' types from the docs (#19585)
* docs: remove implicit 'any' and 'Object' types from the docs

* docs: more docs improvements, remove all remaining empty interfaces

* chore: update tests for better types
2019-08-05 10:45:58 -07:00
Electron Bot
e959137a4b chore: bump chromium to 32e0bab929213da1019992bf31d29 (master) (#19488) 2019-08-02 16:56:46 -07:00
Shelley Vohr
49096c2359
fix: throw on invalid webRequest filters (#19337)
Closes #11371.

Previously, we didn't consider the return value of the webRequest URLPattern mate converter, which meant that when the pattern wasn't correctly parsed owing to invalid filter specification users would not be made aware of that fact and would just think that the filtering itself had failed. This corrects that error by moving the business logic of url pattern parsing out of the converter and into the function itself so that granular and specific errors can be thrown.

There's also no real reason that i'm aware of not to allow wider breadth of filters by letting users use a wildcard for effective TLD, so I also overrode that (default for the 1-arg Parse is not to allow that).

Finally, I added some examples of url filter types for users to reference.
2019-07-25 10:20:02 -07:00
Jeremy Apthorp
7b26048d9e
test: unflake some net specs (#18782) 2019-06-14 16:26:07 -07:00