ericmckean / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

File name on first line of output #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify version: 2.1.2
PHP version: 5.1.6

What steps will reproduce the problem?
1. Using the f option with any js/css file

Expected output:
The file content.

Actual output:
The complete path to the file followed by the file content.

Did any unit tests FAIL?
No.

Please provide any additional information below.

I must be doing something wrong since this is such an obvious problem, but
what? $min_allowDebugFlag is false, but I assume that shouldn't make any
difference. It also doesn't make difference whether
$min_serveOptions['encodeOutput'] is true or false - the line is included
anyway. The cache is of course correct. 

Hans

PS! I'm a programmer so if you tell me where to look or what to debug, I'm
happy to be at any assistance. (I also have FirePHP working.) 

Original issue reported on code.google.com by hansfn@gmail.com on 4 Mar 2009 at 12:50

GoogleCodeExporter commented 9 years ago
Strange. By "path" do you mean filesystem path or URI path? Full path or from 
doc_root?

In the cache directory, the plaintext files are like "minify_[md5]" (no 
extension). 
Can you verify that these files are correct (no path at top)? I don't know if 
this 
is what you meant by "cache is correct".

Can you tell in Firebug if the response is deflated/gzipped?

Original comment by mrclay....@gmail.com on 4 Mar 2009 at 5:10

GoogleCodeExporter commented 9 years ago
The complete filesystem path.

The cache is OK - both plain text, deflated and gzipped - meaning there is no 
extra
path at the top. 

The output from minify is indeed deflated/gzipped, but the extra path is at the 
top
(not deflated/gzipped) - breaking the browser (and Firebug). If I fecth the 
output
from minify with wget/curl, remove the extra path line, I'm able to unencode 
the output.

So the simple question (for you who know minify) is, where is the path line 
added?

PS! The only "special" setting I have, is that I actually have set 
$min_documentRoot. 

Original comment by hansfn@gmail.com on 4 Mar 2009 at 11:56

GoogleCodeExporter commented 9 years ago
Could you try the 2.1.2 I uploaded today, install fresh and manually reset your 
config.php? 

Is it the path of the cache file or the source file?

Can we try to resolve this over IM/e-mail? I'm usually on 8AM-5PM GMT-5. Check 
http://mrclay.org/ for contact info. I'll probably suggest sticking exit() in 
various places :)

Original comment by mrclay....@gmail.com on 5 Mar 2009 at 1:25

GoogleCodeExporter commented 9 years ago
OK, as I predicted in my first post - I had done something very stupid/wrong. 
When
debugging issue 92, I added an "echo $path;" statement and forgot to remove it. 
I
downloaded the new 2.1.2 (that you uploaded today) and a recursive diff made the
error immediately clear.

I'm sorry about the noise and wasted time and effort. Please close this issue.

Hans

Original comment by hansfn@gmail.com on 5 Mar 2009 at 1:57

GoogleCodeExporter commented 9 years ago
No problem.

Original comment by mrclay....@gmail.com on 5 Mar 2009 at 12:51