aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
Commit message (Collapse)AuthorAgeFilesLines
...
* | mime_type will always return a stringAaron Patterson2015-09-081-2/+1
| |
* | remove `parse_content_type` parameterAaron Patterson2015-09-081-6/+7
| | | | | | | | | | This method is specifically about the content type so lets remove the parameter.
* | avoid allocations when there is no content type setAaron Patterson2015-09-081-1/+2
| | | | | | | | | | create a singleton content type that just has nils, so that we don't have to allocate a content type object all the time.
* | 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.
* | 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
| | |