Commit graph

426 commits

Author SHA1 Message Date
bors-servo
c9884604e9 Auto merge of #18882 - KiChjang:fix-origin, r=jdm
Use the correct origin in fetch

Fixes #18147.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18882)
<!-- Reviewable:end -->
2017-11-15 16:08:49 -06:00
Keith Yeung
d5e7137b52 Use the correct origin in fetch 2017-11-15 13:17:16 -08:00
Simon Sapin
793bebfc0e Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08) 2017-11-09 16:56:39 +01:00
bors-servo
dcd7d2fa32 Auto merge of #18981 - KiChjang:fold-type-destination, r=avadacatavra
Merge request type and destination

Fixes #18278.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18981)
<!-- Reviewable:end -->
2017-10-24 17:02:18 -05:00
Keith Yeung
c6bb1cb9d5 Merge request type and destination 2017-10-23 11:19:35 -07:00
Matt Brubeck
2d45e9d2da Use try syntax for Option where appropriate 2017-10-20 08:25:35 -07:00
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07:00
Keith Yeung
4a4caa8583 Update CORS preflight fetch 2017-08-18 16:30:22 -07:00
Keith Yeung
34178bdd4c Update HTTP-network fetch 2017-08-18 16:30:19 -07:00
Keith Yeung
99f59352b8 Update HTTP-network-or-cache fetch 2017-08-18 16:30:16 -07:00
Keith Yeung
d6c197b40c Update HTTP-redirect fetch 2017-08-18 16:30:06 -07:00
Keith Yeung
0ff47c4475 Update HTTP fetch 2017-08-08 09:27:19 -07:00
Keith Yeung
ed9c16575c Update main fetch 2017-08-08 09:22:29 -07:00
Fausto Núñez Alberro
6032940fb8 Change RequestInit origin type to ImmutableOrigin 2017-07-16 21:44:33 +02:00
Keith Yeung
6adc653083 Introduce service-worker mode 2017-06-22 23:48:07 -07:00
Simon Sapin
316cd35767 Untry 2017-06-18 13:21:51 +02:00
Josh Matthews
fe74460bae Read 32kb from the network at a time. 2017-06-05 13:47:39 -04:00
Nikhil Shagrithaya
541baafe1c Redirect document loads manually 2017-05-31 17:28:53 +05:30
Josh Matthews
525e9c08c8 Show HTTP response headers in debug output. 2017-04-17 11:47:08 +10:00
Anthony Ramine
9394469ede Kill Request::omit_origin_header 2017-04-07 12:52:50 +02:00
Anthony Ramine
16863017a9 Move the HTTP connector in HttpState 2017-04-06 19:35:11 +02:00
Anthony Ramine
12ddc891c6 Pass a &Pool<Connector> to http_loader::obtain_response 2017-04-06 18:50:45 +02:00
Anthony Ramine
949a0827e0 Move the SSL client in HttpState 2017-04-06 18:11:20 +02:00
Josh Matthews
ba132e0b4c Remove unnecessary NetworkHttpRequestFactory abstraction. 2017-04-06 19:25:39 +09:00
Josh Matthews
e9fdc4c72a Replace hosts when making TCP connections, not when verifying SSL certs. 2017-04-06 19:25:37 +09:00
Josh Matthews
6079dd4de7 Enable HTTP connection pooling. Retry stale connections indicated by connection reset errors. 2017-04-04 19:40:46 -04:00
Anthony Ramine
901877da1a Introduce http_loader::set_default_accept 2017-04-04 13:17:18 +02:00
Anthony Ramine
64ba597a3a Move Arc out of HttpState 2017-04-03 14:00:36 +02:00
Anthony Ramine
8683f4d43e Reuse HttpState in ResourceGroup 2017-04-03 12:47:35 +02:00
Anthony Ramine
016fee016b Move the HTTP connector to FetchContext 2017-04-03 12:47:33 +02:00
Anthony Ramine
7b16021a89 Make Response::url_list be a bare Vec<ServoUrl> 2017-04-03 12:47:28 +02:00
Anthony Ramine
80e02303d3 Make Response::internal_response a bare boolean 2017-04-03 12:39:11 +02:00
Anthony Ramine
cb2eb81208 Remove all internal mutability from Request 2017-04-03 12:39:07 +02:00
Anthony Ramine
f42a63baea Make fetch take a &Request 2017-04-03 12:33:43 +02:00
Anthony Ramine
9601a66b60 Make cors_preflight_fetch take a &Request 2017-04-03 11:09:39 +02:00
Anthony Ramine
d5cbdffe37 Make cors_check take a &Request 2017-04-03 11:09:38 +02:00
Anthony Ramine
20e0b6cd56 Introduce create_ssl_client
This lets us reuse the same SSL context for all HTTPS requests.
2017-04-02 15:27:40 +02:00
ddh
e527c9a991 Update Hyper and OpenSSL 2017-03-31 16:32:21 +02:00
Anthony Ramine
f66cae3f96 Revert "Introduce create_ssl_context"
This reverts commit 7a4632bfa2.
2017-03-31 16:19:00 +02:00
bors-servo
0f9dbcc808 Auto merge of #16156 - ferjm:issue-16130-http-network-or-cache-fetch, r=jdm
Update http_network_or_cache_fetch according to spec

There are still many steps blocked by the absence of an HTTP cache and the inability to trigger a credentials dialog.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16130

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16156)
<!-- Reviewable:end -->
2017-03-29 19:38:45 -05:00
Anthony Ramine
d022535f9c Make the WebSocket handshake ourselves to ease switching libs
We need to switch to tungstenite to finally update openssl, this commit
rewrites the whole websocket infrastructure to properly follow the Fetch
spec and to make switching to a different websocket library easier.
2017-03-29 19:17:27 +02:00
Anthony Ramine
3ed32f8078 Introduce NetworkError::from_hyper_error and from_ssl_error 2017-03-29 18:01:01 +02:00
Anthony Ramine
7a4632bfa2 Introduce create_ssl_context 2017-03-28 00:37:25 +02:00
Fernando Jiménez Moreno
d919f55884 Update http_network_or_cache_fetch according to spec 2017-03-27 19:45:05 +02:00
Anthony Ramine
e2e2d42e38 Introduce http_loader::is_redirect_status 2017-03-27 14:51:10 +02:00
Anthony Ramine
b096bf4806 Use Url::port instead of Url::port_or_known_default to set Host
AFAIK, if there is no explicit port in the request URL, there should be
no explicit port in the Host header.
2017-03-26 16:15:10 +02:00
Anthony Ramine
92c4a43946 Use NetworkConnector directly to account for replaced hosts
This let us remove a hack where we had to replace the host in the request URL.
2017-03-26 16:15:09 +02:00
Anthony Ramine
54d37d920c Remove some useless Option<T> wrappers from ServoUrl methods 2017-03-26 16:15:06 +02:00
Anthony Ramine
bc5c4fa892 Rework replace_hosts and host_replacement
They do less cloning now.
2017-03-26 16:14:22 +02:00
Fernando Jiménez Moreno
469eb192c5 Allow for redirects after a CORS-preflight 2017-03-10 16:39:33 +01:00