…gives you a clear vision of how performant they are. When you know the number of requests sent for ‘ Request A', you'll be able to tell how much time is spent in each request.
Welcome to the Real World
Track the HTTP Errors
A few weeks ago, we saw that the number of 403 errors was high. So we started to investigate it with New Relic for …
…of a real world application and not just a testing scenario. Maybe we want to take our monolithic Request class and instead run our requests over some HTTP-like protocol over UDP, or maybe even a serial port. If calling Net:: HTTP.new is buried somewhere in an internal # send method, there's not much we can do without DI. We can monkeypatch or redefine methods directly on an instance, but these are not thread-safe or elegant solutions to the problem. DI is the elegant solution, …
def request @ request ||= Rack::Request.new(@environment) end
def user_agent Mobile::UserAgent.new(request.env['HTTP_USER_AGENT']) end
def mobile_requested? request.params['mobile'] == '1' end
def serve_mobile? mobile_requested? || user_agent.mobile? end
def set_mobile_accept_header request.env['HTTP_ACCEPT'] = 'text/html+mobile' end
def response status, headers, body = @application.call(request.env) …
The 400 Bad Request status indicates that the request ‘could not be understood by the server due to malformed syntax'. See the IETF docs
There is also the 422 Unprocessable Entity status code that appears to be popular for roughly the same purpose. I've read from a couple of sources that since the 422 is part of the extension that 400 is preferable over 422. I don't have the knowledge to weigh in on this argument. Perhaps someone can enlighten …
Week of August 13 - August 19, 2012
Looks like there's some focus onoptimizations currently. That's work that many people will welcome.
0d0d4622 adds Request#formats=(extensions) to let you set a prioritized list of multiple formats to use in response.
…Cakephp model exists method Cakephp 2.0 exceptions Cakephp Request data array Cakephp Request is method Cakephp Form helper postLink method Cakephp 2.0 overall controller action changes for CRUD
You can download both the starting sourcecode to follow along with the tutorial and download the ending sourcecode if you want to see what the completed code looks like at my website:
Cakephp 2.0 Update source code:
By software consulting standards, Unspace Interactive is a small boutique. As a byproduct of our small size and close relationship with the startup community, more than half of the Request for Proposals 1 we consider are for what I call " that the Startup."
The typicalfor Software that Powers the is from an entrepreneur that wishes to launch a web-based technology business. The request is that we develop a plan to design and …
Recent releases of ssl? method on the Request that return true if the request is secure. This, internally, calls scheme to check whether any of the that specify an scheme are set (the snippet from Rack's current code is below).include a
1 2 3 4 5 6 7 8 9
if @env [ ' HTTPS' ] == 'on'
elsif @env [ ' HTTP X FORWARDED SSL' ] == 'on'
elsif @env [ …
…enabled, and neither does Canterbury )., which not even provides a use-flag for it. It is, however, turned on by default on (after all, they make heavy use of ), , (since version 12), and openSUSE (and thus, probably, also in
NP: The Brian Jonestown Massacre—Their Satanic Majesties' Second Request
…for me. I'd prefer a pattern where I had a separate Request class for each action, rather than a few largely unrelated methods on the same controller class. But is there and there's a lot else to like, so let's not get into that.