aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
Commit message (Collapse)AuthorAgeFilesLines
* makes it sound less misleadingShunsukeAida2014-07-021-2/+2
|
* push host / port / protocol extraction upAaron Patterson2014-06-301-6/+6
| | | | Then we only need to extract host once.
* add both branches to the only_path conditionalAaron Patterson2014-06-191-6/+6
|
* Change Http::Cache::SPECIAL_KEYS from Array to SetMindaugas Mozūras2014-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slightly improves performance, for example, a simple benchmark: ```ruby require 'benchmark/ips' require 'set' SPECIAL_KEYS = %w[extras no-cache max-age public must-revalidate] SPECIAL_KEYS_SET = Set.new(SPECIAL_KEYS) directive = 'must-revalidate' Benchmark.ips do |x| x.report('array') { SPECIAL_KEYS.include?(directive) } x.report('set') { SPECIAL_KEYS_SET.include?(directive) } end ``` Output: ``` ------------------------------------- array 67926 i/100ms set 74054 i/100ms ------------------------------------- array 2318423.4 (±2.8%) i/s - 11615346 in 5.014899s set 3387981.8 (±4.7%) i/s - 16958366 in 5.019355s ```
* only check named_host? once in normalize_hostAaron Patterson2014-06-121-3/+7
|
* lookup subdomain from the options hash once, defaulting to trueAaron Patterson2014-06-121-2/+2
| | | | | if the subdomain wasn't specified, it's the same as if specifying :subdomain as `true`, so we can default the value to `true` safely.
* only extract domain from the options hash onceAaron Patterson2014-06-121-3/+4
|
* reduce calls to `named_host?`Aaron Patterson2014-06-121-2/+6
| | | | | `normalize_host` already calls `named_host?`, so there is no reason to test `named_host?` again in the `extract_domain` method.
* Removed warning actionpack url.rbJuanito Fatas2014-06-121-2/+2
| | | | | | | | | | Before: /Users/Juan/dev/rails/actionpack/lib/action_dispatch/http/url.rb:95: warning: shadowing outer local variable - port After: No warning
* remove useless to_param callAaron Patterson2014-06-111-1/+1
| | | | | extract_subdomain always returns a string, and to_param calls to_s on a string
* only look up the subdomain onceAaron Patterson2014-06-111-3/+4
|
* scheme should contain one or more charactersAaron Patterson2014-06-111-1/+1
|
* pull the port out of the options hash onceAaron Patterson2014-06-111-2/+3
|
* remove useless nil checkAaron Patterson2014-06-111-2/+2
| | | | | | | | | irb(main):004:0> /foo/ !~ nil => true irb(main):005:0> /foo/ !~ 'bar' => true irb(main):006:0> /foo/ !~ 'foo' => false
* these methods are always called with a tld_parameterAaron Patterson2014-06-111-3/+3
| | | | | remove the default parameter since the methods are always called with a parameter
* rm `same_host?`. The same conditional is two lines down.Aaron Patterson2014-06-111-5/+3
|
* Revert "rm `same_host?`. The same conditional is two lines down."Aaron Patterson2014-06-111-5/+8
| | | | This reverts commit 79469b4b0c05a50e19699bc9b568042add2d4987.
* rm `same_host?`. The same conditional is two lines down.Aaron Patterson2014-06-111-8/+5
|
* cache host on the stack so we only look it up onceAaron Patterson2014-06-111-8/+9
|
* only pull :protocol from the options hash onceAaron Patterson2014-06-111-2/+3
|
* cache protocol on the stack to reduce options hash lookupsAaron Patterson2014-06-111-7/+7
|
* eliminate nil checks in normalize_portAaron Patterson2014-06-111-7/+7
|
* reduce hash lookups and disconnect normalize_port from the options hashAaron Patterson2014-06-111-9/+9
|
* Handle client disconnect during live streamingMatthew Draper2014-06-081-13/+47
| | | | .. even when the producer is blocked for a write.
* Use a frozen Set instance for CGI_VARIABLES.Nathaniel Bibler2014-06-051-8/+21
| | | Also expand the CGI_VARIABLE name listing to multiple lines for cleaner diffs and legibility.
* Merge pull request #15349 from tgxworld/remove_duplicated_method_callRafael Mendonça França2014-06-032-3/+2
|\ | | | | Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
| * Remove duplicated HashWithIndifferentAccess#with_indifferent_access.Guo Xiang Tan2014-05-262-3/+2
| |
* | rm dead codeAaron Patterson2014-05-271-5/+0
| |
* | PARAMETERS_KEY is only used in the request, so move the constant thereAaron Patterson2014-05-271-2/+4
| |
* | rm reset_parameters because we automatically do it from 9ca4839aAaron Patterson2014-05-271-4/+0
| |
* | move path_parameter encoding check to the request objectAaron Patterson2014-05-271-0/+11
|/
* Merge pull request #14986 from dlangevin/trailing-slash-url-generationRafael Mendonça França2014-05-241-7/+13
|\ | | | | | | | | | | | | Fixes URL generation with trailing_slash: true Conflicts: actionpack/lib/action_dispatch/http/url.rb
| * Fixes URL generation with trailing_slash: trueDan Langevin2014-05-221-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | URL generation with trailing_slash: true was adding a trailing slash after .:format Routes.draw do resources :bars end bars_url(trailing_slash: true, format: 'json') # => /bars.json/ This commit removes that extra trailing slash
* | just return path parametersAaron Patterson2014-05-221-2/+1
| |
* | Fix the hash key being delete from envRafael Mendonça França2014-05-221-1/+1
| | | | | | | | It was changed by mistake at c5d64b2b86aa42f57881091491ee289b3c489c7e.
* | use the existing constant rather than the hardcoded stringAaron Patterson2014-05-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | so tht I don't go totally insane with THsi crazy hash driven development. why is Everything a hash? Why do people think hashes in hashes with random keys is a Good API? You can't find things or deprecate them or control access whatsoever, you just have to hope that everyone is like "oh, you want to change that? that's cool! we all know it's hashes so go for it!" The End.
* | fewer string allocations per url_forAaron Patterson2014-05-201-7/+5
| |
* | mutate the path string to avoid object allocationsAaron Patterson2014-05-201-4/+4
| |
* | push only_path conditional upAaron Patterson2014-05-201-18/+19
| |
* | push arg checking upAaron Patterson2014-05-201-4/+4
| |
* | fewer method calls and string garbage when there is no user/passwordAaron Patterson2014-05-201-9/+5
| |
* | fixes stack level too deep exception on action named 'status' returning ↵Christiaan Van den Poel2014-05-151-0/+3
| | | | | | | | 'head :ok'
* | Add RFC4791 MKCALENDAR methodkasper2014-05-151-1/+3
| |
* | Always use the provided port for protocol relative urlsAndrew White2014-05-111-0/+2
| | | | | | | | | | There may be situations where you need to tunnel SSL connections over port 80 so we shouldn't remove it if it has been explicitly provided.
* | ActionDispatch::Http::URL.normalize_port should not strip port for protocol ↵Guilherme Cavalcanti2014-05-111-2/+0
| | | | | | | | relative URL.
* | Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-05-101-1/+22
|\ \
| * | copy edits [ci skip]Vijay Dev2014-05-101-8/+8
| | |
| * | [ci skip] doc Http::Headers methodsschneems2014-05-091-1/+17
| | |
| * | copy edits [ci skip]Vijay Dev2014-05-081-2/+1
| | |
| * | [ci skip] document ActionDispatch::HTTP::Headersschneems2014-05-071-0/+6
| |/