serby / compact

A simple JavaScript compacting middleware for express
50 stars 14 forks source link

Doesn't work on a windows server with FF14 client #23

Open MauritsMeijer opened 12 years ago

MauritsMeijer commented 12 years ago

The slashes in the script tag become \ in windows and FF doesn't correct it It seems to work after changing filename in line 255 to filename.split(path.sep).join('/')

serby commented 12 years ago

Thanks for letting me know. I think the problem comes from the normalize on line 166. I think that if removed it will fix the problem. Might need to remove any extra slashes too though.

serby commented 12 years ago

This should now be fixed in 0.1.2. Can you test it for me please?

MauritsMeijer commented 12 years ago

It renders a single backslash now, instead of a double one, but FF still can't handle it.

MauritsMeijer commented 12 years ago

sorry, it works in production, doesn't in development mode.

serby commented 12 years ago

Could you write a regression test to expose the problem and submit a pull request?

In the mean time I'll see if I can get a Windows setup to test it on.

On 5 September 2012 08:01, MauritsMeijer notifications@github.com wrote:

sorry, it works in production, doesn't in development mode.

— Reply to this email directly or view it on GitHubhttps://github.com/serby/compact/issues/23#issuecomment-8289401.

paul.serby@clock.co.uk Chief Technology Officer

_Direct: +44 2030 516115_Mobile: +44 7881 550999 *

*

MauritsMeijer commented 12 years ago

I'll see what I can do

Op 5-9-2012 10:23, Paul Serby schreef:

Could you write a regression test to expose the problem and submit a pull request?

In the mean time I'll see if I can get a Windows setup to test it on.

On 5 September 2012 08:01, MauritsMeijer notifications@github.com wrote:

sorry, it works in production, doesn't in development mode.

— Reply to this email directly or view it on GitHubhttps://github.com/serby/compact/issues/23#issuecomment-8289401.

paul.serby@clock.co.uk Chief Technology Officer

_Direct: +44 2030 516115_Mobile: +44 7881 550999 *

*

— Reply to this email directly or view it on GitHub https://github.com/serby/compact/issues/23#issuecomment-8290960.

MauritsMeijer commented 12 years ago

It's the normalize path on line 131 that is causing the problem. Removing it fixes that problem.

I can't get the testing stuff to work on Windows right now, so I'm gonna pass on writing a test.

Op 5-9-2012 10:23, Paul Serby schreef:

Could you write a regression test to expose the problem and submit a pull request?

In the mean time I'll see if I can get a Windows setup to test it on.

On 5 September 2012 08:01, MauritsMeijer notifications@github.com wrote:

sorry, it works in production, doesn't in development mode.

— Reply to this email directly or view it on GitHubhttps://github.com/serby/compact/issues/23#issuecomment-8289401.

paul.serby@clock.co.uk Chief Technology Officer

_Direct: +44 2030 516115_Mobile: +44 7881 550999 *

*

— Reply to this email directly or view it on GitHub https://github.com/serby/compact/issues/23#issuecomment-8290960.