bulknews.typepad.com
Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff.
Home
Home
Archives
Profile
Subscribe
2009.09.27
DS-10 Daft Punk
via
d.hatena.ne.jp
Amazing.
Sep 27, 2009 2:39:43 PM
NEXT POST
PATH_INFO decoding horrors
If your application (script) is located in /foo, and when a request is made on /foo/bar%2fbaz (where %2f means an URI encoded forward slash "/"), what would the PATH_INFO value be? /bar%2fbaz (undecoded) or /bar/baz (decoded)? First of all, Apache has a problem using %2c in the URL anyway: they 404 by default, and you should add AllowEncodedSlashes On to accept those requests. More annoyingly, even though the document says: Allowing encoded slashes does not imply decoding. Occurrences of %2F or %5C (only on according systems) will be left as such in the otherwise decoded URL string. This is not actually true, and mod_cgi and other Apache handlers decode those characters. It's reported as a bug but we're still seeing...
PREVIOUS POST
Good languages imitate, Great languages steal.
Stealing from Rack There are lots of great stuff to steal from Ruby Rack. Today I cloned ContentLength middleware as well as updating ConditionalGET middleware. ContentLength middleware can actually be used like a "library" from Server who wants to make sure the content has a Content-Length. I also implemented AccessLog and AccessLog::Timed middleware, which is like a mix of HTTP::Engine::Middleware::AccessLog and Rack::CommonLogger. We support Apache's log-format compatible format templates, and ::Timed subclass actually returns an iterator object that behaves like a filehandle to calculate the real body size (even if it's not array of chunks or real filehandle) and profiles the response serving time. This is disabled by default since that bypasses the same standalone server optimization like sendfile(2). Middleware...
miyagawa
119
Following
605
Followers
Search
Become a Fan
My Other Accounts
Facebook
|
miyagawa
Twitter
|
miyagawa
Recent Comments
Becky:
Good day and welcome to check: http://www.joyfa...
|
more »
On
One Blog.
Mithaldu:
Yeah, now it works....
|
more »
On
One Blog.
miyagawa:
I believe theres a bug in Feedburner - Tumblr c...
|
more »
On
One Blog.
About
Recent Posts
One Blog.
My new Japanese blog (weblog.bulknews.net)
Read Later apps on Kindle
Kindle Touch
CPAN dependencies are more fun to manage than ever
Kindle Fire Review
Status of cpanmetadb
Carton talk at YAPC::Asia - video
YAPC::Asia 2011 notes
Carton CPAN dependency manager
Archives
November 2011
October 2011
September 2011
August 2011
April 2011
March 2011
February 2011
December 2010
November 2010
October 2010
del.icio.us/miyagawa
Flickr
www.
flick
r
.com
My Last FM
Me on the Web
blog.bulknews.net
Publications List
Flickr: Photos from miyagawa
del.icio.us linklog
miyagawa @ Last.FM
CPAN Modules
bulknews.typepad.com
My Vox blog
Twitter @miyagawa
Tatsuhiko Miyagawa - FriendFeed
Subscribe to this blog's feed
Blog
powered by
Typepad
[this is good]
Posted by: .tiff | 2009.09.27 at 14:42
Yes! Win!
Posted by: Allan Young | 2009.10.03 at 23:02