aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | handle implicit rendering correctlyAaron Patterson2015-09-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If someone sets just a charset, but depends on the implicit type from rendering, this will store a strange content type header that looks like this: `; charset=blah`. This is so that when the content type header is parsed again, it will return nil for the actual type.
* | | | | | | | remove mime type lookups when parsing the content typeAaron Patterson2015-09-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that the response object never really cares what the mime type object is, so just use the string.
* | | | | | | | refactor content type settingAaron Patterson2015-09-081-44/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pull content-type setting to a private method to dry it up.
* | | | | | | | make Content-Type header the canonical location for content-type infoAaron Patterson2015-09-081-34/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing content type information in an ivar and a header, lets move to just store the content type info in just the header.
* | | | | | | | pull content type parsing in to a methodAaron Patterson2015-09-081-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we'll use this method later to lazily parse content type headers.
* | | | | | | | ensure that content type defaults to text / html when setting charsetAaron Patterson2015-09-081-0/+7
| | | | | | | |
* | | | | | | | push content_type assigment in to metalAaron Patterson2015-09-083-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | everything above metal really doesn't care about setting the content type, so lets rearrange these methods to be in metal.
* | | | | | | | avoid useless string allocationsAaron Patterson2015-09-082-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _set_content_type only does something when there is a request object, otherwise the return value of _get_content_type is always ignored. This commit moves everything to the module that has access to the request object so we'll never to_s unless there is a reason
* | | | | | | | use accessors instead of manipulating the hashAaron Patterson2015-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the future I would like to make the header hash read only (or at least remove guarantees that mutations will do anything).
* | | | | | | | Merge pull request #21518 from codebaker95/activejob_logging_fixKasper Timm Hansen2015-09-082-1/+23
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | Properly log nested parameters to Active Job
| * | | | | | | Properly log nested parameters to Active JobMarek Pieczyk2015-09-082-1/+23
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Refactor arguments logging method for Active Job
* | | | | | | Merge pull request #21556 from artofhuman/masterRafael Mendonça França2015-09-081-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix typo in activemodel changelog [ci skip]
| * | | | | | | Fix typo in activemodel changelogSemyon Pupkov2015-09-081-4/+4
| | | | | | | |
* | | | | | | | Push key_generator into SerializedCookieJarsKasper Timm Hansen2015-09-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's only used there.
* | | | | | | | Move the request method in to the AbstractCookieJarKasper Timm Hansen2015-09-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `CookieJar` is only at the start of the chain and has its own request method, so we don't need it in the module.
* | | | | | | | Pull up parse to the legacy upgrading moduleKasper Timm Hansen2015-09-081-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was the same in both legacy versions of the signed and encrypted cookie jars.
* | | | | | | | Call super to remove the decrypt_and_verify methodKasper Timm Hansen2015-09-081-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `EncryptedCookieJar` already calls it for us, so just delegate to its `parse` implementation.
* | | | | | | | Call super to remove the verify methodKasper Timm Hansen2015-09-081-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `SignedCookieJar`'s parse method already attempts to verify the message, so we can just call super and try the old verifier if it fails.
* | | | | | | | Add parse method to share deserialization logic.Kasper Timm Hansen2015-09-081-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cuts down on the duplicated reading parts.
* | | | | | | | Add commit in the EncryptedCookieJarKasper Timm Hansen2015-09-081-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gets rid of the option parsing and makes what the encryptor does stand out.
* | | | | | | | Use commit in the SignedCookieJarKasper Timm Hansen2015-09-081-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lets us avoid worrying about parsing the options and doing just what we need.
* | | | | | | | Add commit method to share option normalizationKasper Timm Hansen2015-09-081-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the clutter to make PermanentCookieJar's one change stand out.
* | | | | | | | Add AbstractCookieJar class.Kasper Timm Hansen2015-09-081-1/+3
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Eventually this will be the superclass of all the chained jars.
* | | | | | | Use released mysql2Rafael Mendonça França2015-09-082-8/+3
| | | | | | |
* | | | | | | Merge pull request #21502 from ↵Rafael Mendonça França2015-09-086-3/+47
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bernerdschaefer/bs-polymorphic-url_for-dups-arguments `url_for` does not modify polymorphic options
| * | | | | | | `url_for` does not modify polymorphic optionsBernerd Schaefer2015-09-046-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `url_for` methods in `actionpack` and `actionview` now make a copy of the provided options before generating polymorphic paths or URLs. The bug in the previous behavior is most noticeable in a case like: url_options = [:new, :post, param: 'value'] if current_page?(url_options) css_class = "active" end link_to "New Post", url_options, class: css_class
* | | | | | | | Merge pull request #21552 from ronakjangir47/fixed_docsRichard Schneeman2015-09-081-1/+1
|\ \ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | | Fixed Time conversion example for UTC time zone [ci skip]
| * | | | | | | Fixed Time conversion example for UTC time zone [ci skip]Ronak Jangir2015-09-081-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #21535 from dmitry/feature/validate-multiple-contextsRafael Mendonça França2015-09-085-2/+50
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Validate multiple contexts on `valid?` and `invalid?` at once
| * | | | | | | | Validate multiple contexts on `valid?` and `invalid?` at once.Dmitry Polushkin2015-09-075-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: ```ruby class Person include ActiveModel::Validations attr_reader :name, :title validates_presence_of :name, on: :create validates_presence_of :title, on: :update end person = Person.new person.valid?([:create, :update]) # => true person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]} ```
* | | | | | | | | Merge pull request #21512 from X0nic/guides-clarify-timeout-errorYves Senn2015-09-081-1/+1
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | [Rails Guides] clarify `ActiveRecord::ConnectionTimeoutError`
| * | | | | | | | [Rails Guides] clarify `ActiveRecord::ConnectionTimeoutError`Nathan Lee2015-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original: * ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider increasing it: Modified version: * ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5.000 seconds (waited 5.000 seconds) [ci skip]
* | | | | | | | | Merge pull request #21511 from rwz/ar-exceptions-no-argsEileen M. Uchitelle2015-09-085-66/+178
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Removes mandatory arguments from AR exceptions
| * | | | | | | | | Make ActiveRecordException descendants args optionalPavel Pravosud2015-09-075-66/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows to instantiate all ActiveRecordError descendant execption classes without arguments, which might be useful in testing and is far less surprising than mandatory arguments.
* | | | | | | | | | Merge pull request #21548 from yui-knk/feature/define_tables_as_interfaceYves Senn2015-09-081-0/+5
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define `SchemaStatements#tables` as interface
| * | | | | | | | | | Define `SchemaStatements#tables` as interfaceyui-knk2015-09-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These 3 methods expect `ConnectionAdapters` to have `tables` method, so make it clear that `tables` method is interface. * `ConnectionAdapters::SchemaCache#prepare_tables` * `db:schema:cache:dump` task * `SchemaDumper#tables`
* | | | | | | | | | | Merge pull request #21530 from arvindmehra/am-ar-to-activerecordYves Senn2015-09-084-4/+4
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Replace AR with ActiveRecord to make it more readable [ci skip]
| * | | | | | | | | | | Replace AR with ActiveRecord to make it more readable [ci skip]arvind2015-09-084-4/+4
| |/ / / / / / / / / /
* | | | | | | | | | | Merge pull request #21528 from yui-knk/test/add_tests_for_mysql2_viewYves Senn2015-09-082-64/+66
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | Add tests for test/cases/adapters/mysql2/view_test.rb
| * | | | | | | | | | Add view tests for MySQLyui-knk2015-09-082-64/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically view tests for MySQL are same with `test/cases/adapters/postgresql/view_test.rb`. So move `test/cases/adapters/postgresql/view_test.rb` to `test/cases/view_test.rb` and make them only run if `current_adapter` supports writable view.
* | | | | | | | | | | Merge pull request #21519 from y-yagi/test_runner_raise_errorKasper Timm Hansen2015-09-084-7/+21
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | raise LoadError when a non-existent file or directory is specified to the test runner
| * | | | | | | | | | | modify to pass the correct argument to the test runner from rakeyuuji.yaginuma2015-09-082-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test runner sets file to be tested in plugin_rails_options, but in plugin_rails_options, processing has been made to the argument of the actual command rather than the argument of Minitest.run. For example, if you run `./bin rake db:migrate test`, the options[:patterns], `db:migrate test` was incorrectly set.
| * | | | | | | | | | | raise LoadError when a non-existent file or directory is specified to the ↵yuuji.yaginuma2015-09-072-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test runner Currently, if a file or directory that does not exist was specified in the test runner, that argument is ignored. This commit has been modified to cause an error if there is no file or directory.
* | | | | | | | | | | | :bomb:Rafael Mendonça França2015-09-081-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Memoized reflections accessorRafael Mendonça França2015-09-081-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its value never change since associations are defined at class load time so there is no need to build the hash everytime the method is called. Before this change: Calculating ------------------------------------- reflections 804.000 i/100ms ------------------------------------------------- reflections 8.213k (±26.2%) i/s - 36.180k After this change: Calculating ------------------------------------- reflections 24.548k i/100ms ------------------------------------------------- reflections 1.591M (±25.7%) i/s - 7.364M Benchmark script: require 'bundler/setup' require 'active_record' require 'benchmark/ips' ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do 100.times do |i| create_table "users#{i}", force: true end create_table :cars, force: true do |t| 100.times do |i| t.references "users#{i}" end end end class Car < ActiveRecord::Base 100.times do |i| belongs_to "users#{i}".to_sym end end Benchmark.ips do |x| x.report('reflections') { Car.reflections } end
* | | | | | | | | | | | Merge pull request #21537 from tgxworld/perf_reduce_allocationRafael Mendonça França2015-09-071-5/+5
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | PERF: Reduce allocation in `resolve_column_aliases`.
| * | | | | | | | | | | | Reduce allocation in `resolve_column_aliases`.Guo Xiang Tan2015-09-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benchmark Script Used: ``` begin require 'bundler/inline' rescue LoadError => e $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' raise e end gemfile(true) do source 'https://rubygems.org' gem 'rails', path: '~/rails' # master against ref "f1f0a3f8d99aef8aacfa81ceac3880dcac03ca06" gem 'arel', github: 'rails/arel', branch: 'master' gem 'rack', github: 'rack/rack', branch: 'master' gem 'sass' gem 'sprockets-rails', github: 'rails/sprockets-rails', branch: 'master' gem 'sprockets', github: 'rails/sprockets', branch: 'master' gem 'pg' gem 'benchmark-ips' end require 'active_record' require 'benchmark/ips' ActiveRecord::Base.establish_connection('postgres://postgres@localhost:5432/rubybench') ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :users, force: true do |t| t.string :name, :email t.timestamps null: false end end class User < ActiveRecord::Base; end attributes = { name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", email: "foobar@email.com", } 1000.times { User.create!(attributes) } Benchmark.ips(5, 3) do |x| x.report('where with hash single') { User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") } x.report('where with string single') { User.where("users.name = ?", "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") } x.report('where with hash double') { User.where(name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", email: "foobar@email.com") } x.report('where with string double') { User.where("users.name = ? AND users.email = ?", "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "foobar@email.com") } x.compare! end ``` Before: ``` Calculating ------------------------------------- where with hash single 3.300k i/100ms where with string single 4.965k i/100ms where with hash double 2.594k i/100ms where with string double 4.400k i/100ms ------------------------------------------------- where with hash single 35.161k (± 1.2%) i/s - 178.200k where with string single 53.368k (± 2.9%) i/s - 268.110k where with hash double 27.364k (± 1.1%) i/s - 137.482k where with string double 46.876k (± 2.1%) i/s - 237.600k Comparison: where with string single: 53368.1 i/s where with string double: 46875.5 i/s - 1.14x slower where with hash single: 35160.8 i/s - 1.52x slower where with hash double: 27364.0 i/s - 1.95x slower ``` After: ``` Calculating ------------------------------------- where with hash single 3.403k i/100ms where with string single 5.167k i/100ms where with hash double 2.659k i/100ms where with string double 4.597k i/100ms ------------------------------------------------- where with hash single 36.410k (± 1.3%) i/s - 183.762k where with string single 55.009k (± 2.6%) i/s - 279.018k where with hash double 27.951k (± 1.4%) i/s - 140.927k where with string double 48.362k (± 2.6%) i/s - 243.641k Comparison: where with string single: 55008.6 i/s where with string double: 48361.5 i/s - 1.14x slower where with hash single: 36410.1 i/s - 1.51x slower where with hash double: 27950.9 i/s - 1.97x slower ```
* | | | | | | | | | | | | Merge pull request #21520 from jeremy/friendlier-force-sslJeremy Daer (Kemper)2015-09-073-200/+252
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `config.force_ssl` less dangerous to try and easier to disable
| * | | | | | | | | | | | | Make `config.force_ssl` less dangerous to try and easier to disableJeremy Daer2015-09-073-200/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL redirect: * Move `:host` and `:port` options within `redirect: { … }`. Deprecate. * Introduce `:status` and `:body` to customize the redirect response. The 301 permanent default makes it difficult to test the redirect and back out of it since browsers remember the 301. Test with a 302 or 307 instead, then switch to 301 once you're confident that all is well. HTTP Strict Transport Security (HSTS): * Shorter max-age. Shorten the default max-age from 1 year to 180 days, the low end for https://www.ssllabs.com/ssltest/ grading and greater than the 18-week minimum to qualify for browser preload lists. * Disabling HSTS. Setting `hsts: false` now sets `hsts: { expires: 0 }` instead of omitting the header. Omitting does nothing to disable HSTS since browsers hang on to your previous settings until they expire. Sending `{ hsts: { expires: 0 }}` flushes out old browser settings and actually disables HSTS: http://tools.ietf.org/html/rfc6797#section-6.1.1 * HSTS Preload. Introduce `preload: true` to set the `preload` flag, indicating that your site may be included in browser preload lists, including Chrome, Firefox, Safari, IE11, and Edge. Submit your site: https://hstspreload.appspot.com
* | | | | | | | | | | | | | Merge pull request #21536 from jeremy/support-mysql2-0.4.0Jeremy Daer (Kemper)2015-09-073-4/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | Support mysql2 0.4.0, first release with prepared statements support