logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Javascript GET problem [ Resolved ]
Author
kaloc



Joined: 16 Jul 2010
Posts: 2

PostPosted: Fri 16 Jul '10 21:04    Post subject: Javascript GET problem [ Resolved ] Reply with quote

To get started here is the base information :
OS : Winxp SP3 AMD X4 (Deneb)
Apache : 2.2.15 ( new install , for dev work )
Javascript file : Prototype 1.6 (stable)

The basics in the httpd.conf file have been set and mime.types are still default. Standard html pages work properly.

The problem occurs when serving an htm / html page that includes Prototype with a basic mark-up such as :
Code:
<script src="prototype.js" type="text/javascript"></script>

This mark-up is placed in the <head> section.

The js code is sent along to the target browser, but the browser can't use it because the code has been changed or re-arranged. In Firefox, it throws an error in the console, for example. I used Winmerge to examine the server copy with what is sent to the browser and parts of the code are shifted around by several hundred lines ! That, of course, breaks the integrity of the code.

When I check the apache access log, it says the status code for the GET of prototype.js is 200, so it is reporting a success.

Question : How could a copy of a javascript file that is saved on the server get changed during the GET request and end up completely different when the browser receives it ?


Last edited by kaloc on Mon 19 Jul '10 19:19; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 19 Jul '10 10:58    Post subject: Reply with quote

Does the server send a different encoding than the file is encoded? e.g iso-8859-1 and UTF-8

What do you get if you open the url to the javascript in your browser?

Is deflate enabled?
Back to top
kaloc



Joined: 16 Jul 2010
Posts: 2

PostPosted: Mon 19 Jul '10 17:39    Post subject: Reply with quote

Problem solved; I used ProcessMonitor to track what was being accessed by the apache process ( httpd.exe ) and it was accessing the expected places in the registry, apache, and windows system folders. The only pseudo out-of-place entries were the checks to the Netlimiter dll files, but they were to be expected since any ip based traffic has to pass through netlimiter to see if it needs to be throttled.

I uninstalled Netlimiter ( 1.30 in this case ) and all is well now. I don't know why it would cause that problem as it didn't interfere with other programs, even lighttpd.

For the sake of completeness , I also uninstalled two programs I was just testing out ( Audiomulch & Virtual audio cable ) at the same time as netlimiter, but I highly doubt they were the cause.
Back to top


Reply to topic   Topic: Javascript GET problem [ Resolved ] View previous topic :: View next topic
Post new topic   Forum Index -> Apache