aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
Commit message (Collapse)AuthorAgeFilesLines
* stop inheriting from Rack::RequestAaron Patterson2015-09-045-11/+13
| | | | | | Just include the modules necessary in the Request object to implement the things we need. This should make it easier to build delegate request objects because the API is smaller
* Merge pull request #21483 from justanshulsharma/add-ip6-addressEileen M. Uchitelle2015-09-031-1/+1
|\ | | | | [ci skip] Added localhost IPv6
| * [ci skip] Added localhost IPv6Anshul Sharma2015-09-031-1/+1
| |
* | Remove not used requiresMarcin Olichwirowicz2015-09-013-4/+0
| |
* | Merge pull request #19788 from cmdrclueless/actionpack_http_url_ipv6Rafael Mendonça França2015-09-011-1/+1
|\ \ | | | | | | Fix broken IPv6 addresses handling
| * | Fix broken IPv6 addresses handlingBrian Weaver2015-04-161-1/+1
| | |
* | | add a method for getting the http auth saltAaron Patterson2015-08-291-0/+4
| | |
* | | Merge pull request #21396 from rodzyn/code-cleanupGuillermo Iguaran2015-08-282-13/+2
|\ \ \ | | | | | | | | Code cleanup
| * | | Code cleanupMarcin Olichwirowicz2015-08-272-13/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | Cleanup for `ActionDispatch::Http::Parameters` - no need for required libraries and remove not used private method. Apparently this method was used in `ActionDispatch::Http::Request` - fixed by calling `Request::Utils` explicitly (as was done in other parts of the codebase)
* | | remove dependency on `@cache_control` ivarAaron Patterson2015-08-271-6/+6
| | | | | | | | | | | | | | | eventually we'll remove this instance variable, but this is the first step
* | | remove `@etag` ivarAaron Patterson2015-08-271-5/+7
| | | | | | | | | | | | | | | we're storing the value in the headers hash, so lets just store the value in one place.
* | | use the abstract API in modulesAaron Patterson2015-08-272-14/+15
| | | | | | | | | | | | | | | Modules should be using the API that the abstract modules use so that we can move these modules between implementations
* | | remove useless conditionalAaron Patterson2015-08-271-2/+0
| | | | | | | | | | | | | | | cookies are always stored as a string in the header hash, so it will not need to be joined.
* | | implement the API required by the abstract Rack request.Aaron Patterson2015-08-271-16/+8
| | |
* | | use the non-hash dependent Rack utils APIAaron Patterson2015-08-271-2/+2
|/ / | | | | | | eventually we will refactor this to not know about header hashes
* | remove redefined methodAaron Patterson2015-08-261-3/+0
| | | | | | | | | | Rack::Response::Helpers implements this method, so we can safely remove it
* | provide a request and response to all controllersAaron Patterson2015-08-251-1/+2
| | | | | | | | | | | | | | | | | | | | Controllers should always have a request and response when responding. Since we make this The Rule(tm), then controllers don't need to be somewhere in limbo between "asking a response object for a rack response" or "I, myself contain a rack response". This duality leads to conditionals spread through the codebase that we can delete: * https://github.com/rails/rails/blob/85a78d9358aa728298cd020cdc842b55c16f9549/actionpack/lib/action_controller/metal.rb#L221-L223
* | always return a controller class from the `controller_class` methodAaron Patterson2015-08-251-6/+13
| | | | | | | | | | now the caller can just treat it like a regular controller even though it will return a 404
* | Remove unused block argumentsAnshul Sharma2015-08-251-1/+1
| |
* | remove another `@env` accessAaron Patterson2015-08-241-1/+1
| |
* | remove more direct access to `env`Aaron Patterson2015-08-242-3/+4
| |
* | fewer calls to `env`Aaron Patterson2015-08-241-2/+2
| | | | | | | | We don't want to directly access the env hash
* | stop using `@env` in the GET / POST methodsAaron Patterson2015-08-241-2/+7
| | | | | | | | | | I want to implement this with something besides `@env` in the future, so lets stop directly referencing it.
* | use a request object in the session middlewareAaron Patterson2015-08-221-2/+2
| | | | | | | | | | This commit allows us to use one request object rather than allocating multiple request objects to deal with the session.
* | move more `@env` access to method callsAaron Patterson2015-08-221-16/+16
| | | | | | | | | | We're going to implement storing env values differently in the future, so let's disconnect these methods from the instance variables
* | move ORIGINAL_SCRIPT_NAME to the metaprogrammed methodsAaron Patterson2015-08-221-4/+1
| |
* | metaprogram the HTTP_X_REQUEST_ID methodAaron Patterson2015-08-221-6/+1
| | | | | | | | we're already doing this with a bunch of other header data.
* | use `body_stream` instead of getting the env value ourselvesAaron Patterson2015-08-221-1/+1
| | | | | | | | we have a method that knows how to get rack.input, so lets use that.
* | convert `@env` use to get / set headerAaron Patterson2015-08-221-16/+16
| | | | | | | | | | | | We need to abstract the internals of the request object away from this instance variable so that the values for `@env` can be calculated in a different way.
* | use get / set header to avoid depending on the `env` ivarAaron Patterson2015-08-221-11/+14
| |
* | Refactor to remove controller class from route to requesteileencodes2015-08-221-0/+12
| | | | | | | | | | | | | | | | | | | | This refactoring moves the controller class name that was on the route set to the request. The purpose of this refactoring is for changes we need to move controller tests to integration tests, mainly being able to access the controller on the request instead of having to go through the router. [Eileen M. Uchitelle & Aaron Patterson]
* | set cached values in the env hashAaron Patterson2015-08-211-6/+9
| |
* | stop directly accessing `@env` in mime_negotiationAaron Patterson2015-08-211-8/+8
| | | | | | | | | | we want to go through methods to access `env` because in the future that ivar may not be available, or may be calculated lazily
* | use public API to fetch the parameter filterAaron Patterson2015-08-211-2/+2
| | | | | | | | | | now the parameter filter doesn't need to know about the env hash in these two methds.
* | use methods on the request object to implement `fetch`Aaron Patterson2015-08-211-2/+8
| | | | | | | | Now the Headers internals don't depend on the env hash.
* | dup the env hash on Header#envAaron Patterson2015-08-211-1/+1
| | | | | | | | | | This prevents external mutations from impacting the internals of the request or the Header object.
* | use accessors on the request object for manipulating envAaron Patterson2015-08-211-3/+3
| | | | | | | | | | this reduces the API footprint for the env hash so that we can be more flexible when changing API in the future
* | use `set_header` rather than []=Aaron Patterson2015-08-211-1/+1
| | | | | | | | This allows us to avoid calling `env_name` twice.
* | dup the request and mutate its headers object.Aaron Patterson2015-08-211-2/+2
| | | | | | | | duping the request will dup it's underlying env hash.
* | pass a request object to the headers objectAaron Patterson2015-08-212-10/+16
| |
* | Simplify codeMarcin Olichwirowicz2015-08-131-5/+4
| | | | | | | | | | Since we are always responding with an array and using `any?`, we don't need to check if an array is empty
* | Avoid unnecessary MatchData objectsMarcin Olichwirowicz2015-08-131-1/+1
| |
* | deprecate the env method on controller instancesAaron Patterson2015-08-071-1/+1
| | | | | | | | | | | | people should be accessing request information through the request object, not via the env hash. If they really really want at the env hash, then they can get it off the request.
* | stop using @_env in the controller instanceAaron Patterson2015-08-071-0/+8
| | | | | | | | | | | | | | Actions are processed through `dispatch`, so they should have the request set on them before any user land code can be executed. Lets stop setting _env on the controller, and give access to it through the `env` method.
* | refactor param parsing middleware to use request objectsAaron Patterson2015-08-071-0/+8
| | | | | | | | | | this is another place that we should stop directly accessing the env hash and let the request object take care of that for us
* | Fix documentation on ActionDispatch::RequestGabriel Sobrinho2015-08-061-1/+1
| |
* | use a request object to access info from env in GetIpAaron Patterson2015-08-061-1/+7
| | | | | | | | | | | | | | again, we want to hide the contents of `env` from the implementation. Allocate a request object to access the contents of env, but save allocations due to string literal allocations when accessing the env hash.
* | ask the request if we should show exceptionsAaron Patterson2015-08-061-0/+7
| | | | | | | | | | hide the env key in the request object so that other code doesn't need to know.
* | prevent string allocationsAaron Patterson2015-08-061-1/+1
| |
* | get the underlying REQUEST_METHOD from the superclassAaron Patterson2015-08-061-1/+1
| |