Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…o reduce users' typos
  • Loading branch information
Bo Zhu committed Dec 16, 2014
1 parent c4bf1d2 commit 101aeb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/server.js
Expand Up @@ -124,7 +124,7 @@ function http_req_handler(client_request, client_response) {
+ client_request.method + ' ' + client_request.url.underline);
}

if (client_request.url === '/proxy.pac'
if ((client_request.url === '/proxy.pac' || client_request.url === '/pac.pac')
|| (!shared_tools.string_starts_with(client_request.url, '/proxy'))) {
server_utils.static_responses(client_request, client_response, pac_file_content);
}
Expand Down
2 changes: 1 addition & 1 deletion server/utils.js
Expand Up @@ -170,7 +170,7 @@ function static_responses(client_request, client_response, pac_file_content) {
return;
}

if (client_request.url === '/proxy.pac') {
if (client_request.url === '/proxy.pac' || client_request.url === '/pac.pac') {
var content_type = 'application/x-ns-proxy-autoconfig';
if (client_request.headers['user-agent'] !== undefined &&
client_request.headers['user-agent'].indexOf('PhantomJS') !== -1) {
Expand Down
2 changes: 1 addition & 1 deletion test/test-proxy-pac.js
@@ -1,6 +1,6 @@
var page = require('webpage').create();

var test_url = 'http://127.0.0.1:8888/proxy.pac';
var test_url = 'http://127.0.0.1:8888/pac.pac';

page.open(test_url, function(status) {
if (status !== 'success') {
Expand Down

0 comments on commit 101aeb5

Please sign in to comment.