Monthly Archives: June 2010

第九马来西亚计划教育部的建设拨款中,华小获3.6%!

慕尤丁(Muhyiddin Yassin)表示,国阵政府一年支付国立华小与淡小老师的薪金高达18亿元,声明他们没有忽略非巫裔。

林冠英提问,为何在第九马来西亚计划教育部的建设拨款中,华校生占全体小学数量多达22%,却只能获得3.6%的拨款?他希望政府依据学生数额配额资金给华校。

慕尤丁断然拒绝这项建议,称当局是以基建和整体作考量,而非学生比例。

以基建和整体作考量?我听不懂,可是我知道,肤色才是考量的标准吧?!身为马来西亚国民,有一位如慕尤丁这样的副首相,真是可耻。去年政府所征收的所得税高达800亿令吉。缴交的种族比例是个天大的秘密,就怕说出来后,不得不将3.6%改成36%吧?不晓得国阵里的华裔议员对慕尤丁的说词又有何看法?

Advertisements

Changing HTTP or CGI Response Code

200 OK, 404 Not Found, etc. These are the standard HTTP response code (they may also be called CGI status code). Say, you want to replace standard response code 404 to a custom response code (e.g. 999) for testing or debugging purpose, you can do it easily with Apache Web Server.

  1. Edit the “http.conf”.  In Debian, it’s full path is “/etc/apache2/http.conf”.  Add in the following lines:
    ScriptAlias /cgi-bin/ /var/www/cgi/
    ErrorDocument 404 /cgi-bin/999.pl

    The first line indicates the whereabout of the CGI script directory.
    The second line instruct the Apache to run the “999.pl” script when a HTTP 404 is encountered

  2. Create a custom CGI script in the “/var/www/cgi” directory. Name the script “999.pl”. The content of the script is listed below:
    #!/usr/bin/perl
    use strict;
    use warnings;
    print "Status: 999 CUSTOM RESP\n";
    print "Content-Type: text/html; charset=ISO-8859-1\n";
    print "\n";
    print "<h1>999 CUSTOM RESP</h> \r\n";
    print "Custom response code 999\r\n";
    
  3. Enable execution bit of the script.
    $ chmod a+x /var/www/cgi/999.pl
  4. Reload the configurations.
    # /etc/init.d/apache2 reload

Now if you try to access a non-existing page, you'll get HTTP 999 instead of HTTP 404 like the following:

$ wget -S http://localhost/notExitPage.html
--2010-06-07 10:07:14--  http://localhost/notExistPage.html
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 999 CUSTOM RESP
Date: Mon, 07 Jun 2010 02:07:14 GMT
Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=ISO-8859-1
2010-06-07 10:07:14 ERROR 999: CUSTOM RESP.

Background:
In work, my system (a web service) has been accused of sending HTTP response code 503 to one of the client but the requests were actually processed. The response code 503 (service not available) could never have been sent by my system if the requests had been accepted and processed. My guess is: there are some gateways that sit between the client and my system that returned 503 to the client yet forwarded the requests to my system. To justify my idea, I use the above method to replace 503 response code with 555 (a non-existing code). After the change, the said client is still receiving response code 503. Now, I can be sure the fault is not with my system.  The sad part is, the person in charge of the client system is still not believing that the HTTP 503 is not from my system.