aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
Commit message (Collapse)AuthorAgeFilesLines
* Check if etag exists before to do the gsubRafael Mendonça França2012-09-151-2/+4
| | | | This fix the build http://travis-ci.org/#!/rails/rails/builds/2459981
* fix the buildSteve Klabnik2012-09-151-0/+1
|
* Support for multiple etags in an If-None-Match headerTravis Warlick2012-09-151-1/+7
| | | | | | | | This is a rebased version of #2520. Conflicts: actionpack/test/dispatch/request_test.rb
* Fixed missing requireIlya Vorontsov2012-09-081-0/+1
| | | | | | | Missing require caused fail of guide generation (in action_dispatch/http/mime_type, line 295, undefined method `ends_with` for "to_ary":String) With this fix guides were normally generated
* Refactor `Mime::Type`Aleksey Magusev2012-09-051-84/+93
| | | | | | | | | | | `parse` method performance improvements - ~27-33%: accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, , pronto/1.00.00, sslvpn/1.00.00.00, */*" Benchmark.measure{ 1_000_0.times { Mime::Type.parse(accept) }} old: 1.430000 0.000000 1.430000 ( 1.440977) new: 0.920000 0.000000 0.920000 ( 0.921813)
* Properly reset the session on reset_sessionSteve Klabnik2012-08-311-2/+5
| | | | Fixes #7478
* Add Request#formats=(extensions) that lets you set multiple formats directly ↵David Heinemeier Hansson2012-08-141-0/+21
| | | | in a prioritized order
* push header merge down to a private method so that live responses can have ↵Aaron Patterson2012-08-131-3/+7
| | | | their own header object
* Merge pull request #7302 from homakov/default_headersAaron Patterson2012-08-091-0/+5
|\ | | | | Introduce default_headers. closes #6311 #6515
| * introduce default_headers configEgor Homakov2012-08-091-0/+5
| |
* | initialize instance variablesAaron Patterson2012-08-093-0/+22
|/
* load active_support/core_ext/module/delegation in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-024-4/+0
|
* Merge pull request #7198 from cfcosta/refactor-cache_control_headersRafael Mendonça França2012-07-291-11/+19
|\ | | | | Refactor ActionDispatch::Http::Cache::Response#cache_control_headers
| * Refactor ActionDispatch::Http::Cache::Response#cache_control_headers.Cainã Costa2012-07-301-11/+19
| |
* | header hash is duped before being sent up the rack stackAaron Patterson2012-07-291-12/+16
| |
* | ActionController::DataStreaming::FileBody doesn't respond to #close.Rafael Mendonça França2012-07-291-1/+1
| |
* | flushing output should write to the stream rather than mutating the response ↵Aaron Patterson2012-07-291-8/+12
|/ | | | object
* adding a buffered stream to the response objectAaron Patterson2012-07-291-2/+42
|
* initialize ivars, refactor recycle! to call initializeAaron Patterson2012-07-291-0/+2
|
* threads can wait on responses to be committedAaron Patterson2012-07-271-1/+24
|
* Remove ActionDispatch::Head middleware in favor of Rack::HeadSantiago Pastorino2012-07-231-2/+2
| | | | Closes #7110 there's more work to do on rack-cache issue 69
* Prevent conflict between mime types and Object methodsMircea Pricop2012-07-061-1/+12
| | | | | | | | | | | | | | | | | | | | | | | Assuming the type ":touch", Collector.new was calling send(:touch), which instead of triggering method_missing and generating a new collector method, actually invoked the private method `touch` inherited from Object. By generating the method for each mime type as it is registered, the private methods on Object can never be reached by `send`, because the `Collector` will have them before `send` is called on it. To do this, a callback mechanism was added to Mime::Type This allows someone to add a callback for whenever a new mime type is registered. The callback then gets called with the new mime as a parameter. This is then used in AbstractController::Collector to generate new collector methods after each mime is registered.
* add Mime.fetch so we can have default mime typesAaron Patterson2012-07-031-0/+5
|
* Ensure that cache-control headers are mergedJames Tucker2012-06-181-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are several aspects to this commit, that don't well fit into broken down commits, so they are detailed here: * When a user uses response.headers['Cache-Control'] = some_value, then the documented convention in ConditionalGet is not adhered to, in this case, response.cache_control is ignored due to `return if self[CACHE_CONTROL].present?` * When a middleware sets cache-control headers that would clobber, they're converted to symbols directly, without underscores. This would lead to bugs. * Items that would live in :extras if set through expires_in, are placed directly in the @cache_control hash, and not respected in many cases (somewhat adhering to the aforementioned documentation). * Although quite useless, any directive named 'extras' would be ignored. The general convention applied is that expires_* take precedence, but no longer overwrite everything and expires_* are ALWAYS applied, even if the header is set. I am still unhappy about the contents of this commit, and the code in general. Ideally it should be refactored to no longer use :extras. I'd likely recommend expanding @cache_control into a class, and giving it the power to handle the merge in a more efficient fashion. Such a commit would be a larger change that could have additional semantic changes for other libraries unless they utilize expires_in in very standard ways.
* These lines don't help to mitigate CVE. They only turn [nil] into nil, w/o ↵Egor Homakov2012-06-131-3/+0
| | | | | | them [nil] turns into [] and that is quite innocent. generated SQL - `IN (NULL)` compact! did all the job.
* Array parameters should not contain nil values.Aaron Patterson2012-06-121-2/+4
|
* both string and sumbol will be interpolated as string no need to convert to_sganesh2012-06-111-3/+3
|
* Strip [nil] from parameters hash.Aaron Patterson2012-05-301-0/+22
| | | | | | Thanks to Ben Murphy for reporting this! CVE-2012-2660
* Raise ActionController::BadRequest for malformed parameter hashes.Andrew White2012-05-201-3/+10
| | | | | | | | | | | | | | Currently Rack raises a TypeError when it encounters a malformed or ambiguous hash like `foo[]=bar&foo[4]=bar`. Rather than pass this through to the application this commit captures the exception and re-raises it using a new ActionController::BadRequest exception. The new ActionController::BadRequest exception returns a 400 error instead of the 500 error that would've been returned by the original TypeError. This allows exception notification libraries to ignore these errors if so desired. Closes #3051
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-151-3/+0
|\ | | | | | | | | Conflicts: actionpack/lib/action_view/helpers/asset_tag_helper.rb
| * Removing ==Examples and last blank lines of docs from actionpackFrancesco Rodriguez2012-05-151-3/+0
| |
* | Autoload ActionDispatch::Request::Session to avoid circular require.Andrew White2012-05-131-1/+2
|/
* Merge branch 'master' into sessionAaron Patterson2012-05-042-7/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (55 commits) extract deprecated dynamic methods Add some docs and changelog entry Allow overriding exception handling in threaded consumer Allow configuring a different queue consumer actually don't need to expand the aggregates at all #to_sym is unnecessary de-globalise method extract code from AR::Base clean up implementation of dynamic methods. use method compilation etc. Fix ActiveModel README example mention database mapping in getting started guide Remove vestiges of the http_only! config from configuring guide Remove content-length as well Make ActionController#head pass rack-link RouteSet: optimize routes generation when globbing is used Allows assert_redirected_to to accept a regular expression use extract_options! No need to force conversion to Symbol since case ensures it's already one. No need to work around 1.8 warnings anymore. Update command line guide ...
| * Reset the request parameters after a constraints checkAndrew White2012-05-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | A callable object passed as a constraint for a route may access the request parameters as part of its check. This causes the combined parameters hash to be cached in the environment hash. If the constraint fails then any subsequent access of the request parameters will be against that stale hash. To fix this we delete the cache after every call to `matches?`. This may have a negative performance impact if the contraint wraps a large number of routes as the parameters hash is built by merging GET, POST and path parameters. Fixes #2510.
| * Enable ActionDispatch::Http::Headers to support fetchMark Turner2012-05-021-7/+8
| |
* | bread AD::Request::Session to it's own file, consolidate HASH OF DOOM lookupsAaron Patterson2012-05-031-2/+3
|/
* Fix rdoc formatting in Mime::TypeMark Rushakoff2012-04-291-5/+5
|
* Remove unnecessary empty line José Valim2012-04-251-1/+0
|
* ActionDispatch::HTTP::Url#url_for refactor methodBogdan Gusiev2012-04-241-20/+26
| | | | | Separated right side url generation(before query string) from left side url generation(after query string)
* Add missing requires in routesBogdan Gusiev2012-04-231-0/+2
|
* Fix comment in AD http responseAlexey Vakhov2012-04-131-1/+1
| | | | response in integration test accessible without @ via attr_reader
* Fix example action dispatch in mime typeAlexey Vakhov2012-04-071-1/+1
|
* adds delegetion for eof? to AD::Http::UploadedFileJens Fahnenbruck2012-03-271-1/+1
| | | | | if you want to read the file you may need to ask if there is something to read from
* Revert "Return an actual boolean from xml_http_request?"Xavier Noria2012-03-251-1/+1
| | | | | | | | | | | | | | Reason: This commit changes code that was committed some year and a half ago. The original code is an ordinary predicate that delegates straight to a boolean operator with no further unnecessaru adorments, as clearly explained in #5329. This change also may confuse users who may now believe they can rely now on singletons, while predicates in Rails rely on standard Ruby semantics for boolean values and guarantee no singletons whatsover. This reverts commit 6349791d5aaf652631b29f1371701fc2985fda83.
* Return an actual boolean from xml_http_request?Tim Pope2012-03-231-1/+1
|
* Add ActionController::HTTPSantiago Pastorino2012-03-141-2/+7
| | | | | | More info http://edgeguides.rubyonrails.org/api_app.html [Carlos Antonio da Silva & Santiago Pastorino]
* Refactor AD::UploadedFile, and raise sooner if tempfile is not presentCarlos Antonio da Silva2012-03-061-8/+6
|
* Added parsing of arbitrary media type parameters.Steve Klabnik2012-03-051-3/+3
| | | | | | Based on #4918. Related to #4127.
* Optimize path helpers.José Valim2012-03-021-1/+3
|