Firebug shows a request which causes a huge delay to
http://reboltutorial.com/wp-content/themes/minaflow/none
Details below but I don't understand why it says it comes from xmlrpc and the stylesheet:
Date Sun, 04 Apr 2010 16:10:02 GMT
Server Apache
X-Powered-By PHP/5.2.13
X-Pingback http://reboltutorial.com/xmlrpc.php
Expires Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control no-cache, must-revalidate, max-age=0
Pragma no-cache
Set-Cookie wordpress_test_cookie=WP+Cookie+check; path=/; domain=.reboltutorial.com
Last-Modified Sun, 04 Apr 2010 16:10:03 GMT
Vary Accept-Encoding
Content-Encoding gzip
Keep-Alive timeout=2, max=94
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html; charset=UTF-8
RequĂȘtemise en page impression
GET /wp-content/themes/minaflow/none HTTP/1.1
Host: reboltutorial.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2) Gecko/20100115 Firefox/3.6
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://reboltutorial.com/wp-content/themes/minaflow/style.css
1) Please remove SESSION_ID and all cookies from post (it's quote easy for hacker to access to your site with that)
2) In CSS you have 3 times next code:
background: url(none);
That's why it goes to 404 error!
Related
While testing the webapp I am working on, I have noticed that firefox seems to be ignoring the cache header for user images.
All such images are loaded through a PHP script, here is a sample response:
Cache-Control: private, max-age=0
Connection: Keep-Alive
Content-Disposition: inline; filename="Immagine.jpg"
Content-Encoding: gzip
Content-Length: 33103
Content-Type: image/jpeg
Date: Thu, 16 Mar 2017 15:24:39 GMT
Etag: allegato-4f04349dba5b5f636a439af71ed75109b701a01d6ac5dfc287dee9729ce4e2098b02e39a2d673789213f5fdf20ceb21a0fc26f17e93e602e38238c3681b9bd00
Expires: Fri, 16 Jun 2017 16:24:40 +0200
Keep-Alive: timeout=5, max=100
Last-Modified: Tue, 16 Jul 2013 10:18:04 +0200
Server: Apache
Vary: Accept-Encoding
and here are the relevant parts of the request sent by firefox:
Host: mywebapp.local
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Accept: */*
Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
I think the issue might be due to FF sending those Pragma and Cache-Control headers, however I checked multiple times and I have caching enabled.
The "same" request on Chrome, which caches correctly, looks like this:
Accept:image/webp,image/*,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
DNT:1
Host:mywebapp.local
If-Modified-Since:Tue, 16 Jul 2013 10:18:10 +0200
If-None-Match:allegato-4f04349dba5b5f636a439af71ed75109b701a01d6ac5dfc287dee9729ce4e2098b02e39a2d673789213f5fdf20ceb21a0fc26f17e93e602e38238c3681b9bd00
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
How can I determine if this issue is related to my own browser, or rather to the webapp itself?
On Firefox there is one more switch that you have to uncheck in order to disable Cache when the Toolbox is open. You open the Toolbox (Ctrl+Shift+i), navigate to Toobox Options, and uncheck the Disable HTTP Cache when toolbox is open which by default is checked
I'm encountering problems after moving my project management tool to a new server. There is a checkbox on the project list page which when enabled hides all project with the status of complete and writes an entry in the config table of the database (HIDE_COMPLETE_PROJECTS) and then reloads the project list page after the AJAX post is successful. However, after moving the site to another server, changes are made to the hange_hide_completed_status.php. database but the project list page does not reload, it seems that no response is being sent back from the server. Not sure if it makes a difference but my old server had php 5.2,17, the new one has 5.4 installed. Also the version of jquery is very old (1.4.4). I thought I might have a problem with compression, so disabled mod_deflate on the new server, but this didn't help. Interestingly if I call the php file change_hide_completed_status.php directly from the old site, I get non-printing characters and on the new site, firefox won't display the page due to a content encoding error. I think there is a problem with the server configuration/the content type but I can't get any closer.
Here is the code:
function changeStatus(checkboxStatus){
if (checkboxStatus.checked){
hide_status_value =1;
}else{
hide_status_value =0;
}
$.ajax({
type: 'POST',
data: {'hide_status':hide_status_value},
url: 'change_hide_completed_status.php',
cache:false,
success: function(response) {
window.location.reload(true);
}
});
}
<?php
include_once ("/var/www/sdtm/etc/config.php");
$status = $REQUEST_DATA['hide_status'];
$d = new PhPagaDbData;
$fields = array('HIDE_COMPLETE_PROJECTS' => $status);
$key = 'HIDE_COMPLETE_PROJECTS';
$fields = array('cfg_value' => $status);
$r = $d->update('config', $fields, 'cfg_key = ?', $key);
exit;
?>
HTTP response old server:
POST /sdtm/change_hide_completed_status.php HTTP/1.1
Host: mccosh.de
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Accept: */*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://mccosh.de/sdtm/projects.php
Content-Length: 13
Cookie: PHPSESSID=d2b013669f1268af1cf516e60ae20c75
Authorization: Basic c2VjcmV0OnNlY3JldA==
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
hide_status=0
HTTP/1.1 200 OK
Date: Tue, 30 Dec 2014 11:04:13 GMT
Server: Apache
X-Powered-By: PHP/5.2.17
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 220
Keep-Alive: timeout=5, max=8
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
HTTP response new server:
http://192.168.148.180:12323/change_hide_completed_status.php
POST /change_hide_completed_status.php HTTP/1.1
Host: 192.168.148.180:12323
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Accept: */*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://192.168.148.180:12323/projects.php
Content-Length: 13
Cookie: PHPSESSID=4pj4md762cm2n1efqm5kljuse2; shellInABox=942508454:111011010
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
hide_status=0
HTTP/1.1 200 OK
Date: Tue, 30 Dec 2014 10:39:16 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.4-14+deb7u5
Content-Encoding: gzip
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 23
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
So now I am feeling silly: the application uses it's own gzip compression which was screwing everything up. After disabling this, everything was fine.
Im using FireFox's HTTP Live headers to view the headers.
I wrote a script at mydomain.com that just sets a test cookie.
I thought that when we send a request to a naked URL, http://mydomain.com/script.php, cookies are sent across to all sub-domains.
But when I sent a request to http://www.mydomain.com/script.php, the cookie wasnt sent in the header request by the browser. How come ?
http://mydomain.com/script.php
GET /script.php HTTP/1.1
Host: mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8pre) Gecko/20100710 Ubuntu/9.10 (karmic) Namoroka/3.6.8pre
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 16 Jul 2010 00:08:11 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.2.11
Set-Cookie: UserID=23; expires=Fri, 16-Jul-2010 01:08:11 GMT; path=/
Content-Encoding: gzip
----------------------------------------------------------
http://www.mydomain.com/script.php
GET /script.php HTTP/1.1
Host: www.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8pre) Gecko/20100710 Ubuntu/9.10 (karmic) Namoroka/3.6.8pre
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 16 Jul 2010 00:08:24 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.2.11
Set-Cookie: UserID=23; expires=Fri, 16-Jul-2010 01:08:24 GMT; path=/
Content-Encoding: gzip
----------------------------------------------------------
Is it that the newer browser aren't sending the headers like before ?
Add the domain option, domain=.mydomain.com. This corresponds to the domain parameter of setcookie, and this is explained there:
"To make the cookie available on all
subdomains of example.com then you'd
set it to '.example.com'."
Here is the request and response headers
http://www.example.com/get/pdf
GET /~get/pdf HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://www.example.com
Cookie: etc
HTTP/1.1 200 OK
Date: Thu, 29 Apr 2010 02:20:43 GMT
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: Me
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Cache-Control: private
Content-Disposition: attachment; filename="File #1.pdf"
Content-Length: 18776
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
----------------------------------------------------------
Basically, the response headers are sent by DOMPDF's stream() method.
In Firefox, the file is prompted as File #1.pdf. However, in Safari, the file is saved as File #1.pdf.html.
Does anyone know why Safari is appending the html extension to the filename?
I'm also using Kohana 3, serving the PDF from a controller method.
From what i see the content type is incorrect, i believe if that is fixed, your problem will be solved.
I've fixed it by adding die(); after streaming it
$dompdf = new DOMPDF();
$dompdf->set_paper("a4", "portrait");
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream($invoice.".pdf");
die();
Because you're telling it that it's HTML. Fix your MIME type.
Content-Type: text/html; charset=utf-8
You can change how Kohana 3 sends headers like so...
$this->request->headers['Content-Type'] = File::mime($file);
My Browser isn't sending back an If-Modified-Since Header for PHP generated Content
on the first request my script sends:
(Status-Line) HTTP/1.1 200 OK
Date Thu, 21 Jan 2010 08:55:25 GMT
Server Apache/2.2.11 (Win32) PHP/5.2.9-1
X-Powered-By PHP/5.2.9-1
Pragma no-cache
x-ua-compatible IE=8;FF=3;OtherUA=4
Last-Modfied Sat, 02 Jan 2010 02:02:20 GMT
Content-Length 28453
Etag b98e0795b509be20146f58e06fbb624f
Keep-Alive timeout=5, max=90
Connection Keep-Alive
Content-Type image/png
it on the second request it sends:
(Request-Line) GET /kincumberunitingchurch/banner_image.php?id=1 HTTP/1.1
Host localhost
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17
Accept image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Referer http://localhost/kincumberunitingchurch/index.php?sid=tgl9jq3f71nau3cj9vps6pna03
Cookie sid=tgl9jq3f71nau3cj9vps6pna03; PHPSESSID=m0jvven6d7l65pl6odm9ecfnt4
If-None-Match b98e0795b509be20146f58e06fbb624f
Cache-Control max-age=0
for other files the sever sends first:
(Status-Line) HTTP/1.1 200 OK
Date Thu, 21 Jan 2010 08:55:25 GMT
Server Apache/2.2.11 (Win32) PHP/5.2.9-1
Last-Modified Wed, 30 Dec 2009 02:40:58 GMT
Etag "1000000013d35-40d9-47be9117f6280"
Accept-Ranges bytes
Content-Length 16601
Keep-Alive timeout=5, max=84
Connection Keep-Alive
Content-Type image/png
and my browser send the following on the next request:
(Request-Line) GET /kincumberunitingchurch/img/cbuttons.png HTTP/1.1
Host localhost
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17
Accept image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Referer http://localhost/kincumberunitingchurch/mystyle.css
Cookie sid=tgl9jq3f71nau3cj9vps6pna03; PHPSESSID=m0jvven6d7l65pl6odm9ecfnt4
If-Modified-Since Wed, 30 Dec 2009 02:40:58 GMT
If-None-Match "1000000013d35-40d9-47be9117f6280"
Cache-Control max-age=0
why would it send the If-Modified-Since header
Your first sended header reads "Last-Modfied", which is a typo (the first 'i' in Modified is missing).
can you look if the Last-Modfied inside the first example isn't a typo at the server side