Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a default Accept-Language header to HTTP requests. #11692

Merged
merged 1 commit into from Jun 10, 2016

Conversation

@jdm
Copy link
Member

jdm commented Jun 9, 2016

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #11008
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

highfive commented Jun 9, 2016

Heads up! This PR modifies the following files:

@Manishearth
Copy link
Member

Manishearth commented Jun 10, 2016

failures:

---- http_loader::test_check_default_headers_loaded_in_every_request stdout ----

    thread 'http_loader::test_check_default_headers_loaded_in_every_request' panicked at 'assertion failed: `(left == right)` (left: `Headers { Host: mozilla.com, Accept-Encoding: gzip, deflate, br, User-Agent: Test-agent, Accept: text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8, Accept-Language: en-US, en; q=0.5, }`, right: `Headers { Host: mozilla.com, Accept-Encoding: gzip, deflate, br, User-Agent: Test-agent, Accept: text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8, }`)', /home/travis/build/servo/servo/tests/unit/net/http_loader.rs:251

stack backtrace:

   1:     0x7fe92e72220f - std::sys::backtrace::tracing::imp::write::h6528da8103c51ab9

   2:     0x7fe92e725bab - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hbe741a5cc3c49508

   3:     0x7fe92e725798 - std::panicking::default_hook::he0146e6a74621cb4

   4:     0x7fe92e712a9e - std::panicking::rust_panic_with_hook::h983af77c1a2e581b

   5:     0x7fe92e725df1 - std::panicking::begin_panic::he426e15a3766089a

   6:     0x7fe92e713d8a - std::panicking::begin_panic_fmt::hdddb415186c241e7

   7:     0x7fe92e11f4a6 - _<net_tests..http_loader..AssertMustHaveHeadersRequestFactory as net..http_loader..HttpRequestFactory>::create::hf5284c18ddadd366

                        at /home/travis/build/servo/servo/components/servo/<std macros>:8

   8:     0x7fe92e1479fe - net::http_loader::obtain_response::he7389fc9a1269bd6

                        at /home/travis/build/servo/servo/components/net/http_loader.rs:784

   9:     0x7fe92e13aba0 - net::http_loader::load::ha382e2bf24a8e677

                        at /home/travis/build/servo/servo/components/net/http_loader.rs:969

  10:     0x7fe92e12d81f - net_tests::http_loader::test_check_default_headers_loaded_in_every_request::h45c63709790e06a0

                        at /home/travis/build/servo/servo/tests/unit/net/http_loader.rs:410

  11:     0x7fe92e6a8326 - _<F as alloc..boxed..FnBox<A>>::call_box::h4283bd5f3e0848ea

  12:     0x7fe92e6aaab7 - std::panicking::try::call::hbfcc4525ea6dedba

  13:     0x7fe92e72f9bb - __rust_try

  14:     0x7fe92e72f95e - __rust_maybe_catch_panic

  15:     0x7fe92e6aaede - _<F as alloc..boxed..FnBox<A>>::call_box::ha6eb56fd00d64ede

  16:     0x7fe92e7242d4 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46

  17:     0x7fe92d008183 - start_thread

  18:     0x7fe92cb1f37c - clone

  19:                0x0 - <unknown>

---- http_loader::test_request_and_response_data_with_network_messages stdout ----

    thread 'http_loader::test_request_and_response_data_with_network_messages' panicked at 'assertion failed: `(left == right)` (left: `HttpRequest { url: "https://mozilla.com/", method: Get, headers: Headers { Accept: text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8, Accept-Language: en-US, en; q=0.5, User-Agent: Test-agent, Host: mozilla.com, Accept-Encoding: gzip, deflate, br, }, body: None, pipeline_id: PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }, startedDateTime: Tm { tm_sec: 30, tm_min: 29, tm_hour: 21, tm_mday: 9, tm_mon: 5, tm_year: 116, tm_wday: 4, tm_yday: 160, tm_isdst: 0, tm_utcoff: 0, tm_nsec: 663096083 }, timeStamp: 1465507770, connect_time: 0, send_time: 0 }`, right: `HttpRequest { url: "https://mozilla.com/", method: Get, headers: Headers { Accept: text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8, User-Agent: Test-agent, Host: mozilla.com, Accept-Encoding: gzip, deflate, br, }, body: None, pipeline_id: PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }, startedDateTime: Tm { tm_sec: 30, tm_min: 29, tm_hour: 21, tm_mday: 9, tm_mon: 5, tm_year: 116, tm_wday: 4, tm_yday: 160, tm_isdst: 0, tm_utcoff: 0, tm_nsec: 663096083 }, timeStamp: 1465507770, connect_time: 0, send_time: 0 }`)', /home/travis/build/servo/servo/tests/unit/net/http_loader.rs:524

stack backtrace:

   1:     0x7fe92e72220f - std::sys::backtrace::tracing::imp::write::h6528da8103c51ab9

   2:     0x7fe92e725bab - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hbe741a5cc3c49508

   3:     0x7fe92e725798 - std::panicking::default_hook::he0146e6a74621cb4

   4:     0x7fe92e712a9e - std::panicking::rust_panic_with_hook::h983af77c1a2e581b

   5:     0x7fe92e725df1 - std::panicking::begin_panic::he426e15a3766089a

   6:     0x7fe92e713d8a - std::panicking::begin_panic_fmt::hdddb415186c241e7

   7:     0x7fe92e15a122 - net_tests::http_loader::test_request_and_response_data_with_network_messages::hd62540095964271d

                        at /home/travis/build/servo/servo/components/servo/<std macros>:8

   8:     0x7fe92e6a8326 - _<F as alloc..boxed..FnBox<A>>::call_box::h4283bd5f3e0848ea

   9:     0x7fe92e6aaab7 - std::panicking::try::call::hbfcc4525ea6dedba

  10:     0x7fe92e72f9bb - __rust_try

  11:     0x7fe92e72f95e - __rust_maybe_catch_panic

  12:     0x7fe92e6aaede - _<F as alloc..boxed..FnBox<A>>::call_box::ha6eb56fd00d64ede

  13:     0x7fe92e7242d4 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46

  14:     0x7fe92d008183 - start_thread

  15:     0x7fe92cb1f37c - clone

  16:                0x0 - <unknown>

failures:

    http_loader::test_check_default_headers_loaded_in_every_request

    http_loader::test_request_and_response_data_with_network_messages
@jdm jdm force-pushed the jdm:language branch from 982b2b6 to c8bf60d Jun 10, 2016
@highfive
Copy link

highfive commented Jun 10, 2016

New code was committed to pull request.

@Manishearth
Copy link
Member

Manishearth commented Jun 10, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 10, 2016

📌 Commit c8bf60d has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jun 10, 2016

Testing commit c8bf60d with merge 2ae8a70...

bors-servo added a commit that referenced this pull request Jun 10, 2016
Add a default Accept-Language header to HTTP requests.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11008
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11692)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 10, 2016

💔 Test failed - mac-rel-wpt

@highfive
Copy link

highfive commented Jun 10, 2016

  ▶ CRASH [expected OK] /dom/nodes/Node-parentNode.html
  │ 
  │ ERROR:constellation::constellation: Panic: resize sent to nonexistent pipeline
  │ ERROR:constellation::constellation: Backtrace:
  │ frame #0  - 0x0000000103f880fe - backtrace::backtrace::trace::hccde8df28b4db2a2
  │ frame #1  - 0x0000000103f88081 - backtrace::capture::Backtrace::new::h42f95930bb8c5ee8
  │ frame #2  - 0x00000001034c4d86 - _&lt;F as alloc..boxed..FnBox&lt;A&gt;&gt;::call_box::h6bf1f1518fe13d1a
  │ frame #3  - 0x0000000103f6d937 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │ frame #4  - 0x000000010417c844 - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
  │ frame #5  - 0x0000000102e810c4 - std::panicking::begin_panic::h0bf39f6d43ab9349
  │ frame #6  - 0x0000000103524830 - script::script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::h41a556e2c2c94fe6
  │ frame #7  - 0x0000000103507332 - script::script_thread::ScriptThread::handle_msgs::h6a699373a020da16
  │ frame #8  - 0x00000001034c3557 - std::panicking::try::call::hb8565a24f25031fc
  │ frame #9  - 0x000000010419835b - __rust_try
  │ frame #10 - 0x00000001041982f5 - __rust_maybe_catch_panic
  │ frame #11 - 0x00000001034c47b4 - _&lt;F as alloc..boxed..FnBox&lt;A&gt;&gt;::call_box::h78c73797281bb868
  │ frame #12 - 0x0000000104193dd8 - std::sys::thread::Thread::new::thread_start::h9c883b6d445ece46
  │ frame #13 - 0x00007fff9534f059 - _pthread_body
  │ frame #14 - 0x00007fff9534efd6 - _pthread_start
  │ 
  └ ERROR:constellation::constellation: Pipeline failed in hard-fail mode.  Crashing!
@jdm
Copy link
Member Author

jdm commented Jun 10, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 10, 2016

Previous build results for android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, windows are reusable. Rebuilding only mac-rel-wpt...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 10, 2016

@bors-servo bors-servo merged commit c8bf60d into servo:master Jun 10, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.