I shoot the following Post request to a remote apache server,hosting a small php script:
The POST:
var request = $.ajax({
type: 'POST',
url: 'http://my.server.on.port/mmm.php',
data: { abc: "abcdefghijklmnopqrstuvwxyz" } })
.done(function(data) { alert("success :"+data.slice(0, 100)); });
request.fail(function(jqXHR, textStatus) {
alert( "Request failed: " + request.reponseText + " " + request.status +" " + request.statusText +" " +request.responseText );
});
mmm.php script:
<?php echo json_encode(array("first"=>"XXXXX","last"=>"YYYYY")); ?>
httpd.conf:
ServerName my.server.on.port
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
NameVirtualHost "my.server.on.port"
Listen 80
<VirtualHost *:80>
DocumentRoot "/var/www/html/QR/tst"
ServerName "my.server.on.port:80"
<Directory "/var/www/html/QR/tst">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/html/QR/tst/css/smoothness">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/html/QR/tst/development-bundle">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/html/QR/tst/development-bundle/ui">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/html/QR/tst/development-bundle/demos">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
The reply from the server is 304. all files has 755 permission. No idia how to solve this. thanx!
HTTP/1.1 304 Not Modified
Date: Sat, 21 Jul 2012 08:45:38 GMT
Server: Apache/2.2.22 (Fedora)
Connection: close
ETag: "c0744-f7a-4c553071e0d4e"
this is the alert with the error: