regilero's blog
More on Static file redirector
So On a previous blog entry http://www.makina-corpus.org/blog/use-rewritemap-prevent-proxying-some-s... I presented the base for a rewriteRule settings to serve some targeted plone static files directly from apache and without proxying to Plone. No let's make this solution even better.
* use a hash map for url mappings
* create a virtual /static url and apply some cache managment rules on his contents
* allow the use of the /satic/ url directly
* ensure only mapped static files are served via this static directory
Use RewriteMap to prevent proxying for some static contents
Let's say we would like to prevent an application server to serve static content. And let's take a complex example, Plone. Plone is a Zope based application server and is not using a clean url-map for static contents. We'll take plone as an example but it's not the only app which is not handling static files outside general uri-application-mapping.
Relative/Absolute URL and Proxies
If you develop a web application you'll come soon at the moment of building your URLs.
6 nice things not know enough about PostgreSQL
With the new PostgreSQL server versions in place (8.2 and 8.3) and in a more general way with the 8.x series some nice fonctionnalities have benn added. Let's have a short look at som interesting ones: FILLFACTOR=50/Id on INSERT/TOAST FIELDS/TABLE INHERITANCE/TABLE PARTITIONNING/NOTIFY and LISTEN
1) WITH FILLFACTOR=50 in CREATE TABLE instructions (since 8.2):
Autocomplete Ajax search with Dojo and Zend Framework
With the new Zend Framework 1.6 we've these nice Dojo widgets.
New things lacks documentations most of times. So if you want to build something really usefull like theses nice autocomplete search combobox this example could save you a lot of time.
We assume you have dojo already installed and activated on your views, and that acl verifications are done elsewhere, on your Controller plugins for example.
First let's see HTML code (in your view):
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dojox.data.QueryReadStore");
Forcing HTTP/1.0 Apache response when PHP is there...
Recently I had to force an HTTP/1.0 response with Apache because of a bad Java Parser.
Temps de réponse réél d'une page web avec ... netcat
Bon, j'imagine que la plupart des gens (heu.. d'un certain type) savent qu'on peut faire du web 'à la main' avec telnet ou netcat. Et bien on peut. Donc. Je voulais me servir de cela pour tracer quelques temps de réponse de pages html précises. Le tout en une seule ligne histoire de se servir de l'historique et pas de mon cerveau pour la retaper.
Commencons par un telnet sur www.google.com sur le port 80 (web). On tape la requète comme si nous étions un navigateur web (très basique le navigateur). La requète HTTP va donc être:
GET / HTTP/1.0