gitlab-org--gitlab-foss/spec/support
Stan Hu 0fdfd2dd6e Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark
Here was the problem:

1. When determining whether a given blob is viewable text, gitlab_git reads the first 1024 bytes and checks with Linguist whether it is a text or binary file.
2. If the blob is text, GitLab will attempt to display it.
3. However, if the text has binary characters after the first 1024 bytes, then GitLab will attempt to load the entire contents, but the encoding will be ASCII-8BIT since there are binary characters.
4. The Error 500 results when GitLab attempts to display a mix UTF-8 and ASCII-8BIT.

To fix this, we load as much data as we are willing to display so that the detection will work properly. Requires
an update to gitlab_git: gitlab-org/gitlab_git!86

Closes #13826
2016-06-12 07:36:25 -07:00
..
api
gitlab_stubs
matchers Merge branch 'adambutler/gitlab-ce-feature/support-diff-of-issue-title-rename' 2016-05-20 16:23:04 -05:00
api_helpers.rb
capybara.rb
capybara_helpers.rb
carrierwave.rb
db_cleaner.rb
email_format_shared_examples.rb
email_helpers.rb
factory_girl.rb
fake_u2f_device.rb Add feature specs covering U2F registration and authentication. 2016-06-06 12:50:31 +05:30
filter_spec_helper.rb Split Markdown rendering & reference gathering 2016-05-26 17:14:00 +02:00
fixture_helpers.rb
import_spec_helper.rb Move ImportSpecHelper to spec/support/ 2016-06-08 17:21:08 +02:00
issue_tracker_service_shared_example.rb
jira_service_helper.rb
login_helpers.rb Pass the "Remember me" value to the 2FA token form 2016-05-30 22:25:35 -04:00
markdown_feature.rb Hook up the updated `WikiLinkFilter` to the wiki controllers. 2016-06-09 10:15:01 +05:30
mentionable_shared_examples.rb
project_hook_data_shared_example.rb
reference_parser_helpers.rb Split Markdown rendering & reference gathering 2016-05-26 17:14:00 +02:00
relative_url.rb
repo_helpers.rb
select2_helper.rb
services_shared_context.rb
setup_builds_storage.rb
stub_configuration.rb
stub_gitlab_calls.rb Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features 2016-06-03 16:22:26 +02:00
stub_gitlab_data.rb
taskable_shared_examples.rb
test_env.rb Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark 2016-06-12 07:36:25 -07:00
wait_for_ajax.rb
webmock.rb
workhorse_helpers.rb