Current time: 11-17-2019, 07:49 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebPagetest doesn't seem to take mod_rewrite into consideration.
07-01-2013, 12:34 AM
Post: #1
WebPagetest doesn't seem to take mod_rewrite into consideration.
Hello, I found a similar thread in this forum but it didn't contain any technical information so I decided to open a new one.

I have serverA.com which uses mod_rewrite on apache (behind varnish) to rewrite image links to serverB.com. Here's the headers as seen when making the request from my own computer:

Code:
http://serverA.com/uploads/BANNER.jpg

GET /uploads/serverA-BANNER.jpg HTTP/1.1
Host: serverA.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20130627 Firefox/22.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: http://serverA.com/
Cookie: [...]
Connection: keep-alive
Cache-Control: max-age=0

HTTP/1.1 302 Found
Server: Apache/2.2.16 (Debian)
Location: http://serverB.com/serverA.com/uploads/BANNER.jpg
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=iso-8859-1
Content-Length: 300
Date: Sun, 30 Jun 2013 14:18:08 GMT
X-Varnish: 1974816656
Age: 0
Via: 1.1 varnish
Connection: keep-alive
----------------------------------------------------------
http://serverB.com/serverA.com/uploads/BANNER.jpg

GET /serverA.com/uploads/BANNER.jpg HTTP/1.1
Host: serverB.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20130627 Firefox/22.0
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
DNT: 1
Referer: http://serverA.com/
Cookie: [...]
Connection: keep-alive
If-Modified-Since: Sun, 02 Jun 2013 20:10:26 GMT
If-None-Match: "9613-62c3-4de3170519080"
Cache-Control: max-age=0

HTTP/1.1 304 Not Modified
Date: Sun, 30 Jun 2013 14:18:09 GMT
Server: Apache/2.2.22 (Debian)
Connection: Keep-Alive
Keep-Alive: timeout=5, max=98
Etag: "9613-62c3-4de3170519080"
Cache-Control: max-age=604800, public

However, WebPagetest reports the following:
Code:
FAILED - (No max-age or expires) - http://serverA.com/uploads/BANNER.jpg
Find all posts by this user
Quote this message in a reply
07-02-2013, 10:53 AM
Post: #2
RE: WebPagetest doesn't seem to take mod_rewrite into consideration.
Do you have a link to an actual test result? It will be easier to follow. WebPagetest doesn't care about rewrite or anything on the back-end. It sends requests to your Varnish instance and sees whatever comes back.

That said, if it is warning about a missing expires on the redirect request (rather than the actual resource after the redirect) then that's something I'm looking into.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-02-2013, 09:02 PM
Post: #3
RE: WebPagetest doesn't seem to take mod_rewrite into consideration.
(07-02-2013 10:53 AM)pmeenan Wrote:  Do you have a link to an actual test result? It will be easier to follow. WebPagetest doesn't care about rewrite or anything on the back-end. It sends requests to your Varnish instance and sees whatever comes back.

That said, if it is warning about a missing expires on the redirect request (rather than the actual resource after the redirect) then that's something I'm looking into.

I have sent you the link via personal message.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)