473,410 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Why has Ajax.Updater missed https to http?

From client side, I access with https. In my code

Expand|Select|Wrap|Line Numbers
  1. alert(location.protocol)   // pop up https
  2.  
  3. new Ajax.Updater("sip_tab_content",
  4.                     "/rails/test_modules/show/" + $F("boardid"),                    
  5.                     {method :'get',
  6.                       onFailure:displaySIPTabFailure,
  7.                       onComplete:displaySIPTabFailure
  8.                     });


On server side, is ruby on rails:

Expand|Select|Wrap|Line Numbers
  1. def show
  2.     @test_module = TestModule.find(params[:id])
  3. File.open("C:\\rubylog.txt", 'w') {|f| f.write(request.url)}    # I get http://.......  here
  4.     respond_to do |format|
  5.       format.html # show.html.erb
  6.       format.xml  { render :xml => @test_module }
  7.     end
  8.   end
I don't know whether Ajax.Updater missed my https. I found articles saying: Ajax.Updater is from Ajax.Request and the latter is from XMLHttpRequest, and XMLHttpRequest can transmit on both http and https. Then where is the problem??

Anyone know?

thanks.
May 9 '10 #1
3 3402
I'm not sure whether RoR can handle https request properly by default.
May 10 '10 #2
Also I wrote: f.write(request.port), the value is 80. However, the show page seemed to be displayed with https, for I had banned http and enforce https access on server and the show page under view folder is displayed without error. So I suspect that the request only takes default values for some parameters, as the client is Javascript file, not ruby set the request.url, request.ssl, request.port or others of such. I only guess and not sure of this. If the request is not reliable, I didn't how to judge the request is using http or https from the ruby code, not by my eyes.
May 10 '10 #3
The second code is in RoR, using MVC mode, in class derived from ApplicationController. Acting as server.
the first is JS file. Acting as client to send request..
May 10 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: marc.fuehnen | last post by:
hi everybody, tried the framework and build a little SQL Update, triggered by a JS function: <a href="Javascript:updateData()"><img src="../images/thumbs/thumb_blue.png" border="0" /></a> ...
2
by: hardrock | last post by:
Hello! I'm working with the prototype library version 1.4.0 and having a strange error lately. When I want to make an Ajax.Updater call, it basically works. But as soon as I put the call into...
1
by: pankajit09 | last post by:
Hello, Is it possible to put two placeholders in Ajax Updater ? or Can I use the same placeholder(div ID ) at two places in HTML? var myAjax =...
2
by: lukemack | last post by:
hi, i am trying to make the contents of one drop-down box dependent on the contents of another using AJAX (prototype.js) and PHP I have it working so that a new dropdown appears when i select...
1
by: winsonlee | last post by:
login: function(e){ var pars = 'name=' + escape($F('name')); var myAjax = new Ajax.Updater('response', 'ajaxServer.php', {method: 'get', parameters: pars}); // if response != '' this.deactivate ...
2
by: Megalith | last post by:
I'm getting perplexed on this, essentially i have an html file which is using prototype to provide the Ajax. the html has a button which when clicked calls the settings.php file and should display...
2
by: chrissi | last post by:
Hello Everyone, altought by English is not so ggod, I try to explain my problem... With the prototype ajax.updater it's possible to update a div trough a given url. Is there any possibility...
8
by: luftikus143 | last post by:
Hi there, I recently upgraded to Firefox 3 and suddenly my Ajax.Updater doesn't work anymore. Firefox gives me a "Security Error"... I am using the recent versions of prototype and script.xx.us. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.